routes/routes
library
Functions
-
offAllNamed<T>(String newRouteName, {RoutePredicate? predicate, dynamic arguments, int? id, Map<String, String>? parameters})
→ Future<T?>?
-
进入下一个界面并取消之前的所有路由(在购物车、投票和测试中很有用)
-
offAndToNamed<T>(String page, {dynamic arguments, int? id, dynamic result, Map<String, String>? parameters})
→ Future<T?>?
-
关闭当前页面并进入下一个界面
-
offBack<T>([T? result])
→ void
-
关闭SnackBars、Dialogs、BottomSheets或任何你通常会用Navigator.pop(context)关闭的东西
-
offNamed<T>(String page, {dynamic arguments, int? id, bool preventDuplicates = true, Map<String, String>? parameters})
→ Future<T?>?
-
进入下一个页面,但没有返回上一个页面的选项(用于SplashScreens,登录页面等)
-
offNamedUntil<T>(String page, RoutePredicate predicate, {int? id, dynamic arguments, Map<String, String>? parameters})
→ Future<T?>?
-
进入下一个界面并取消之前的满足条件的路由
-
to<T>(dynamic page, {bool? opaque, Transition? transition, Curve? curve, Duration? duration, int? id, String? routeName, bool fullscreenDialog = false, dynamic arguments, Bindings? binding, bool preventDuplicates = true, bool? popGesture, double gestureWidth(BuildContext context)?})
→ Future<T?>?
-
Navigation.push()** shortcut.
-
toLogin({bool preventDuplicates = true})
→ Future<bool>
-
导航到默认的登录页面
-
toNamed<T>(String page, {dynamic arguments, int? id, bool preventDuplicates = true, Map<String, String>? parameters})
→ Future<T?>?
-
导航到新的页面
-
until(RoutePredicate predicate, {int? id})
→ void
-
将导航器栈中当前路由上所有的页面都关闭,直到它遇到第一个路由(通常是根路由)。这样做可以确保你回到应用的根页面
-
untilOffAllBackToRoot()
→ void
-
关闭所有页面回root
also like Navigator.of(context).popUntil((route) => route.isFirst);