NavigationExtension<T> extension
Extension providing navigation functionalities
- on
Properties
- arguments → dynamic
-
give current arguments
no setter
- bottomBarHeight → double
-
The distance from the bottom edge to the first unpadded pixel,
in physical pixels.
no setter
- context → BuildContext?
-
give access to currentContext
no setter
- currentRoute → String
-
give name from current route
no setter
- defaultDialogTransitionCurve → Curve
-
Retrieves the default curve for dialog transitions.
no setter
- defaultDialogTransitionDuration → Duration
-
Retrieves the default duration for dialog transitions.
no setter
- defaultOpaqueRoute → bool
-
Retrieves the default setting for using opaque routes.
no setter
- defaultPopGesture → bool
-
Retrieves the default setting for enabling the back gesture.
no setter
- defaultTransition → Transition?
-
Retrieves the default transition setting.
no setter
- defaultTransitionCurve → Curve
-
Retrieves the default curve for transitions.
no setter
- defaultTransitionDuration → Duration
-
Retrieves the default duration for transitions.
no setter
- deviceLocale → Locale?
-
Retrieves the locale of the device.
no setter
- engine → WidgetsBinding
-
The current null safe WidgetsBinding
no setter
- focusScope → FocusNode?
-
give access to FocusScope.of(context)
no setter
- height → double
-
The vertical extent of this size
no setter
- iconColor → Color?
-
give access to Theme.of(context).iconTheme.color
no setter
- isBottomSheetOpen → bool?
-
check if bottomsheet is open
no setter
- isDarkMode → bool
-
Check if dark mode theme is enable
no setter
- isDialogOpen → bool?
-
check if dialog is open
no setter
- isOpaqueRouteDefault → bool
-
check if default opaque route is enable
no setter
- isOverlaysClosed → bool
-
Returns true if there is no Snackbar, Dialog or BottomSheet open
no setter
- isOverlaysOpen → bool
-
Returns true if a Snackbar, Dialog or BottomSheet is currently OPEN
no setter
- isPlatformDarkMode → bool
-
Check if dark mode theme is enable on platform on android Q+
no setter
- isPopGestureEnable → bool
-
check if popGesture is enable
no setter
- isSnackbarOpen → bool
-
check if snackbar is open
no setter
-
key
→ GlobalKey<
NavigatorState> -
Retrieves the global key for accessing the navigator state.
no setter
-
keys
→ Map<
String, GetDelegate> -
Retrieves a map of keys associated with Refreshed delegates.
no setter
- mediaQuery → MediaQueryData
-
give access to Mediaquery.of(context)
no setter
- overlayContext → BuildContext?
-
give access to current Overlay Context
no setter
-
parameters
↔ Map<
String, String?> -
Retrieves the parameters associated with the current route.
getter/setter pair
- pixelRatio → double
-
The number of device pixels for each logical pixel.
no setter
- previousRoute → String
-
give name from previous route
no setter
- rawRoute → Route?
-
check a raw current route
no setter
-
rootController
→ GetRootState<
T> -
Retrieves the root controller state.
no setter
- routing → Routing
-
Retrieves the current routing configuration.
no setter
- size → Size
-
Retrieves the size of the application window.
no setter
- statusBarHeight → double
-
The distance from the top edge to the first unpadded pixel,
in physical pixels.
no setter
- testMode ↔ bool
-
Retrieves the current test mode status.
getter/setter pair
- textScaleFactor → double
-
The system-reported text scale.
no setter
- textTheme → TextTheme
-
give access to TextTheme.of(context)
no setter
- theme → ThemeData
-
give access to Theme.of(context)
no setter
- width → double
-
The horizontal extent of this size.
no setter
- window → PlatformDispatcher
-
The window to which this binding is bound.
no setter
Methods
-
addKey(
GlobalKey< NavigatorState> newKey) → GlobalKey<NavigatorState> ? - Function to add a new navigator key to the application.
-
appUpdate(
) → void - Function to trigger an application update.
-
back(
{T? result, bool canPop = true, int times = 1, String? id}) → void -
Navigation.popUntil() shortcut.
-
backLegacy(
{T? result, bool closeOverlays = false, bool canPop = true, int times = 1, String? id}) → Future< void> - Pop the current page, snackbar, dialog or bottomsheet in the stack
-
changeTheme(
ThemeData theme) → void - Function to change the theme of the application.
-
changeThemeMode(
ThemeMode themeMode) → void - Function to change the theme mode of the application.
-
close(
{bool closeAll = true, bool closeSnackbar = true, bool closeDialog = true, bool closeBottomSheet = true, String? id, T? result}) → void -
Navigation.popUntil() (with predicate) shortcut .
-
closeAllBottomSheets(
{String? id}) → void - Closes all open bottom sheets.
-
closeAllDialogs(
{String? id}) → void - Closes all open dialogs.
-
closeAllDialogsAndBottomSheets(
String? id) → void - Closes all open dialogs and bottom sheets.
-
closeAllOverlays(
) → Future< void> - Closes all open overlays (dialogs, bottom sheets, and snackbars).
-
closeAllSnackbars(
) → Future< void> - A function to close all active snackbars.
-
closeCurrentSnackbar(
) → Future< void> - A function to close the currently displayed snackbar, if any.
-
closeOverlay(
{String? id}) → void - Closes the topmost overlay (dialog or bottom sheet) using the given delegate key.
-
delegate<
TDelegate extends RouterDelegate< (TPage> , TPage>) → TDelegate? - Casts the stored router delegate to a desired type
-
forceAppUpdate(
) → Future< void> - As a rule, Flutter knows which widget to update, so this command is rarely needed. We can mention situations where you use const so that widgets are not updated with setState, but you want it to be forcefully updated when an event like language change happens. using context to make the widget dirty for performRebuild() is a viable solution. However, in situations where this is not possible, or at least, is not desired by the developer, the only solution for updating widgets that Flutter does not want to update is to use reassemble to forcibly rebuild all widgets. Attention: calling this function will reconstruct the application from the sketch, use this with caution. Your entire application will be rebuilt, and touch events will not work until the end of rendering.
-
nestedKey(
String? key) → GetDelegate< T> ? - Function to retrieve a nested delegate by its key.
-
off(
Widget page(), {bool? opaque, Transition? transition, Curve? curve, bool? popGesture, String? id, String? routeName, T? arguments, List< BindingsInterface> bindings = const <BindingsInterface>[], bool fullscreenDialog = false, bool preventDuplicates = true, Duration? duration, double gestureWidth(BuildContext context)?}) → Future<T?> ? -
Navigation.pushReplacement() shortcut .
-
offAll(
Widget page(), {bool predicate(GetPage)?, bool? opaque, bool? popGesture, String? id, String? routeName, T? arguments, List< BindingsInterface> bindings = const <BindingsInterface>[], bool fullscreenDialog = false, Transition? transition, Curve? curve, Duration? duration, double gestureWidth(BuildContext context)?}) → Future<T?> ? -
Push a
page
and pop several pages in the stack untilpredicate
returns true.predicate
is optional -
offAllNamed(
String newRouteName, {T? arguments, String? id, Map< String, String> ? parameters}) → Future<T?> ? -
Navigation.pushNamedAndRemoveUntil() shortcut.
-
offAndToNamed(
String page, {T? arguments, String? id, T? result, Map< String, String> ? parameters}) → Future<T?> ? -
Navigation.popAndPushNamed() shortcut.
-
offNamed(
String page, {T? arguments, String? id, Map< String, String> ? parameters}) → Future<T?> ? -
Navigation.pushReplacementNamed() shortcut.
-
offNamedUntil(
String page, bool predicate(GetPage)?, {String? id, T? arguments, Map< String, String> ? parameters}) → Future<T?> ? -
Navigation.pushNamedAndRemoveUntil() shortcut.
-
offUntil(
Widget page(), bool predicate(GetPage), [Object? arguments, String? id]) → Future< T?> - Navigates off until a page that satisfies the given predicate is found.
-
removeRoute(
String name, {String? id}) → void -
Navigation.removeRoute() shortcut.
-
searchDelegate(
String? k) → GetDelegate< T> - Function to search for a delegate by its route id.
-
to(
Widget page(), {bool? opaque, Transition? transition, Curve? curve, Duration? duration, String? id, String? routeName, bool fullscreenDialog = false, T? arguments, List< BindingsInterface> bindings = const <BindingsInterface>[], bool preventDuplicates = true, bool? popGesture, bool showCupertinoParallax = true, double gestureWidth(BuildContext context)?, bool rebuildStack = true, PreventDuplicateHandlingMode preventDuplicateHandlingMode = PreventDuplicateHandlingMode.reorderRoutes}) → Future<T?> ? -
Navigation.push() shortcut.
-
toNamed(
String page, {T? arguments, String? id, bool preventDuplicates = true, Map< String, String> ? parameters}) → Future<T?> ? -
Navigation.pushNamed() shortcut.
-
until(
bool predicate(GetPage), {String? id}) → void -
Navigation.popUntil() shortcut.
-
updateLocale(
Locale l) → Future< void> - Asynchronously updates the application locale and forces an update.