GetNavigationExt extension
Methods
-
addKey(GlobalKey<NavigatorState> newKey)
→ GlobalKey<NavigatorState>?
-
-
appUpdate()
→ void
-
-
args<T>()
→ T
-
-
back<T>({T? result, bool canPop = true, int times = 1, String? id})
→ void
-
Navigation.popUntil() shortcut.
-
backLegacy<T>({T? result, bool closeOverlays = false, bool canPop = true, int times = 1, String? id})
→ void
-
Pop the current page, snackbar, dialog or bottomsheet in the stack
-
changeTheme(ThemeData theme)
→ void
-
-
changeThemeMode(ThemeMode themeMode)
→ void
-
-
close<T extends Object>({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
-
-
closeAllDialogs({String? id})
→ void
-
-
closeAllDialogsAndBottomSheets(String? id)
→ void
-
-
closeAllOverlays()
→ void
-
-
closeAllSnackbars()
→ void
-
-
closeCurrentSnackbar()
→ Future<void>
-
-
closeOverlay({String? id})
→ void
-
-
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?
-
-
off<T>(Widget page(), {bool? opaque, Transition? transition, Curve? curve, bool? popGesture, String? id, String? routeName, dynamic arguments, List<BindingsInterface> bindings = const [], bool fullscreenDialog = false, bool preventDuplicates = true, Duration? duration, double gestureWidth(BuildContext context)?})
→ Future<T?>?
-
Navigation.pushReplacement() shortcut .
-
offAll<T>(Widget page(), {bool predicate(GetPage)?, bool? opaque, bool? popGesture, String? id, String? routeName, dynamic arguments, List<BindingsInterface> bindings = const [], 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
until predicate
returns true. predicate
is optional
-
offAllNamed<T>(String newRouteName, {dynamic arguments, String? id, Map<String, String>? parameters})
→ Future<T?>?
-
Navigation.pushNamedAndRemoveUntil() shortcut.
-
offAndToNamed<T>(String page, {dynamic arguments, String? id, dynamic result, Map<String, String>? parameters})
→ Future<T?>?
-
Navigation.popAndPushNamed() shortcut.
-
offNamed<T>(String page, {dynamic arguments, String? id, Map<String, String>? parameters})
→ Future<T?>?
-
Navigation.pushReplacementNamed() shortcut.
-
offNamedUntil<T>(String page, bool predicate(GetPage)?, {String? id, dynamic arguments, Map<String, String>? parameters})
→ Future<T?>?
-
Navigation.pushNamedAndRemoveUntil() shortcut.
-
offUntil<T>(Widget page(), bool predicate(GetPage), [Object? arguments, String? id])
→ Future<T?>
-
-
removeRoute(String name, {String? id})
→ void
-
Navigation.removeRoute() shortcut.
-
searchDelegate(String? k)
→ GetDelegate
-
-
to<T extends Object?>(Widget page(), {bool? opaque, Transition? transition, Curve? curve, Duration? duration, String? id, String? routeName, bool fullscreenDialog = false, dynamic arguments, List<BindingsInterface> bindings = const [], 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<T>(String page, {dynamic arguments, dynamic 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>
-