初见

关于'!_debugLocked': is not true.问

2020-05-29  本文已影响0人  Flonger

可以使用Future去包含路由跳转:

  Future.delayed(Duration.zero,(){
    Navigator.of(context).push(MaterialPageRoute(
      builder: (BuildContext context) => routes.buildPage(path, params),
    ));
  });
  Future.delayed(Duration.zero,(){
    Navigator.of(context).push(MaterialPageRoute(
      settings: RouteSettings(name: path),
      builder: (BuildContext context) => routes.buildPage(path, params),
      fullscreenDialog: true,
    ));
  });
  Future.delayed(Duration.zero,(){
    Navigator.of(context).pop();
  });
上一篇 下一篇

猜你喜欢

热点阅读