NavigationExtensions extension
Extension methods on BuildContext to simplify navigation operations.
- on
Properties
- arguments → Object?
-
Available on BuildContext, provided by the NavigationExtensions extension
Gets the arguments passed to the current route, if available.no setter - routeName → Object?
-
Available on BuildContext, provided by the NavigationExtensions extension
Gets the name of the current route, if available.no setter - routeSettings → Object?
-
Available on BuildContext, provided by the NavigationExtensions extension
Gets the settings of the current route, if available.no setter
Methods
-
canPop(
) → bool -
Available on BuildContext, provided by the NavigationExtensions extension
Checks if the navigator can pop the current route. -
pop<
T extends Object?> ([T? result]) → void -
Available on BuildContext, provided by the NavigationExtensions extension
Pops the current route off the navigator. -
push<
T extends Object?> (Widget screen, {RouteSettings? settings, bool maintainState = true, bool fullscreenDialog = false, }) → Future< T?> -
Available on BuildContext, provided by the NavigationExtensions extension
Pushes a newscreenonto the navigator. -
pushAndRemoveUntil<
T extends Object?> (Widget screen, {RouteSettings? settings, bool maintainState = true, bool fullscreenDialog = false, bool routes = false, }) → Future< T?> -
Available on BuildContext, provided by the NavigationExtensions extension
Pushes a newscreenonto the navigator and removes all previous routes. -
pushNamed<
T extends Object?> (String routeName, {Object? arguments, }) → Future< T?> -
Available on BuildContext, provided by the NavigationExtensions extension
Pushes a named route onto the navigator. -
pushNamedAndRemoveUntil<
T extends Object?> (String routeName, {Object? arguments, }) → Future< T?> -
Available on BuildContext, provided by the NavigationExtensions extension
Pushes a named route onto the navigator and removes all previous routes. -
pushReplacement<
T extends Object?> (Widget screen, {RouteSettings? settings, bool maintainState = true, bool fullscreenDialog = false, dynamic result}) → Future< T> -
Available on BuildContext, provided by the NavigationExtensions extension
Replaces the current route with a newscreen. -
pushReplacementNamed<
T extends Object?, TO extends Object?> (String routeName, {TO? result, Object? arguments, }) → Future< T?> -
Available on BuildContext, provided by the NavigationExtensions extension
Replaces the current route with a named route.