router library

Enums

Transition
all posible transition animation for the router module

Properties

appKey → GlobalKey<State<StatefulWidget>>
GlobalKey to detenrminate if a MaterialApp or CupertinoApp is using the onGenerateRoute paremeter or for custom transitions using named routes we need to now the value of routes parameter
no setter
arguments → Object?
return the arguments of the current page
no setter
context → BuildContext?
return the current context linked to the global navigatorKey
no setter
a GlobalKey
no setter
observer → NavigatorObserver
the observer to listen the changes in the stack route
no setter
settings → RouteSettings
return the current route settings
no setter

Functions

canPop() → bool
return true if we can do pop
dispose() → void
use this method to destroy the current navigatorKey attached to the app
getRoute<T>(Widget page, {Object? arguments, bool maintainState = true, bool fullscreenDialog = false, bool backGestureEnabled = true, Transition? transition, Duration? transitionDuration}) → Route<T>
get the transition
maybePop<T>([T? result]) → Future<bool>
Consults the current route's Route.willPop method, and acts accordingly, potentially popping the route as a result;
pop<T>([T? result]) → void
remove the current page or dialog from the stack until predicate
popAndPushNamed<T extends Object?, TO extends Object?>(String routeName, {Object? arguments, bool backGestureEnabled = true, Transition? transition, Duration? transitionDuration, TO? result}) → Future<T?>
Pop the current route off the navigator and push a named route in its place
popUntil([bool predicate(Route)?]) → void
remove all pages in the stack until predicate
push<T>(Widget page, {Object? arguments, bool maintainState = true, bool fullscreenDialog = false, Transition? transition, Duration? transitionDuration, bool backGestureEnabled = false}) → Future<T?>
Push the given page onto the navigator.
pushNamed<T>(String routeName, {Object? arguments, bool backGestureEnabled = true, Transition? transition, Duration? transitionDuration}) → Future<T?>
Push a named route onto the navigator.
pushNamedAndRemoveUntil<T>(String routeName, {bool predicate(Route)?, Object? arguments, bool backGestureEnabled = true, Transition? transition, Duration? transitionDuration}) → Future<T?>
navigates to a new pages and remove until
pushReplacement<T extends Object?, TO extends Object?>(Widget page, {Object? arguments, bool maintainState = true, bool fullscreenDialog = false, Transition? transition, Duration transitionDuration = const Duration(milliseconds: 300), bool backGestureEnabled = false, TO? result}) → Future<T?>
Replace the current page of the navigator by pushing the given page and then disposing the previous route once the new route has finished animating in.
pushReplacementNamed<T extends Object?, TO extends Object?>(String routeName, {Object? arguments, bool backGestureEnabled = true, Transition? transition, Duration? transitionDuration, TO? result}) → Future<T?>
replace the current page with a new route name
setDefaultTransition(Transition transition, {Duration? duration}) → void
set the default transition for all pages