关于'!_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();
});