ContextlessNavigator class

this class has the navigator state and the transition configuration

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
hashCode int
The hash code for this object.
no setterinherited
a GlobalKey
no setter
observer MeeduNavigatorObserver
the observer to listen the changes in the stack route
no setter
routeSettings RouteSettings?
store the current route settings
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
settings RouteSettings
return the current route settings
no setter
transition Transition
no setter
transitionDuration Duration
no setter

Methods

canPop() bool
return true if we can do pop
dispose() → void
use this method to destroy the current navigatorKey attached to the app
maybePop<T>([T? result]) Future<bool>
Consults the current route's Route.willPop method, and acts accordingly, potentially popping the route as a result;
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
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.
pushAndRemoveUntil<T>(Widget page, {bool predicate(Route)?, Object? arguments, bool backGestureEnabled = true, bool maintainState = true, bool fullscreenDialog = false, Transition? transition, Duration? transitionDuration}) Future<T?>
navigates to a new pages and remove until
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
setRouteSettings(RouteSettings settings, {bool isOverrride = false}) → void
set the current route settings data
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

i ContextlessNavigator
expose the MeeduNavigator soingleton
final