GetDelegate class

Inheritance
Mixed-in types

Constructors

GetDelegate({GetPage? notFoundRoute, List<NavigatorObserver>? navigatorObservers, TransitionDelegate? transitionDelegate, PopMode backButtonPopMode = PopMode.history, PreventDuplicateHandlingMode preventDuplicateHandlingMode = PreventDuplicateHandlingMode.reorderRoutes, Iterable<GetPage> pickPagesForRootNavigator(RouteDecoder currentNavStack)?, String? restorationScopeId, bool showHashOnUrl = false, GlobalKey<NavigatorState>? navigatorKey, required List<GetPage> pages})
GetDelegate.createDelegate({GetPage? notFoundRoute, List<GetPage> pages = const [], List<NavigatorObserver>? navigatorObservers, TransitionDelegate? transitionDelegate, PopMode backButtonPopMode = PopMode.history, PreventDuplicateHandlingMode preventDuplicateHandlingMode = PreventDuplicateHandlingMode.reorderRoutes, GlobalKey<NavigatorState>? navigatorKey})
factory

Properties

activePages List<RouteDecoder>
no setter
backButtonPopMode PopMode
final
canBack bool
Whether back is able to pop a route, either a pageless route sitting on top of the navigator or a previous entry in activePages.
no setter
currentConfiguration RouteDecoder?
Called by the Router when it detects a route information may have changed as a result of rebuild.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
lastNavigationWasPop bool
Whether the change currently being applied to activePages was caused by a back navigation (back, popRoute, backUntil, popModeUntil or the platform reporting a back navigation on Flutter Web).
no setter
The key used for retrieving the current navigator.
getter/setter pairoverride-getter
final
notFoundRoute GetPage
final
pageSettings PageSettings?
no setter
parameters Map<String, String>
The parameters of the page currently being built, falling back to the parameters of the top-most entry of activePages outside of a page build (see arguments).
no setter
pickPagesForRootNavigator Iterable<GetPage> Function(RouteDecoder currentNavStack)?
final
preventDuplicateHandlingMode PreventDuplicateHandlingMode
final
registeredRoutes List<GetPage>
no setter
restorationScopeId String?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
transitionDelegate TransitionDelegate?
final

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
addPage(GetPage getPage) → void
addPages(List<GetPage> getPages) → void
arguments<T>() → T
The arguments of the page currently being built, falling back to the arguments of the top-most entry of activePages outside of a page build, so that pages pushed within the same frame each observe their own arguments.
back<T>([T? result]) → void
Pops the topmost route with an optional result.
override
backAndtoNamed<T, R>(String page, {T? result, Object? arguments}) Future<R?>
override
backUntil(bool predicate(GetPage)) → void
override
build(BuildContext context) Widget
Called by the Router to obtain the widget tree that represents the current state.
override
canPopHistory() Future<bool>
canPopPage() Future<bool>
clearRouteTree() → void
consumeReplaceReport() bool
Returns whether the next route information report should overwrite the current platform history entry instead of pushing a new one, and clears the pending state.
didRemoveOutletPage(Page page) → void
Reflects a page removal performed imperatively on a nested GetRouterOutlet navigator back into this delegate's history (#2107).
dispose() → void
Discards any resources used by the object.
override
getVisualPages(RouteDecoder? currentHistory) Iterable<GetPage>
Computes the page stack hosted by the root navigator from the navigation history.
goToUnknownPage([bool clearPages = false]) Future<void>
override
handlePopupRoutes({Object? result}) Future<bool>
Pops the topmost visual route through the navigator when it is a pageless route (e.g. a dialog, bottom sheet or a route pushed imperatively with Navigator.push), returning true if a pop was handled and false when the topmost route is a page managed by this delegate.
matchRoute(String name, {PageSettings? arguments}) RouteDecoder
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
off<T>(Widget page(), {bool? opaque, Transition? transition, Curve? curve, Duration? duration, String? id, String? routeName, bool fullscreenDialog = false, Object? arguments, List<Binding> bindings = const [], bool preventDuplicates = true, bool? popGesture, bool showCupertinoParallax = true, double gestureWidth(BuildContext context)?, CustomTransition? customTransition}) Future<T?>
override
offAll<T>(Widget page(), {bool predicate(GetPage route)?, bool opaque = true, bool? popGesture, String? id, String? routeName, Object? arguments, List<Binding> bindings = const [], bool fullscreenDialog = false, Transition? transition, Curve? curve, Duration? duration, bool showCupertinoParallax = true, double gestureWidth(BuildContext context)?, CustomTransition? customTransition}) Future<T?>?
override
offAllNamed<T>(String newRouteName, {Object? arguments, String? id, Map<String, String>? parameters}) Future<T?>?
override
offNamed<T>(String page, {Object? arguments, String? id, Map<String, String>? parameters}) Future<T?>
override
offNamedUntil<T>(String page, {bool predicate(GetPage route)?, Object? arguments, String? id, Map<String, String>? parameters}) Future<T?>?
override
offUntil<T>(Widget page(), bool predicate(GetPage), [Object? arguments]) Future<T?>
override
ownMiddlewaresOf(String name) List<GetMiddleware>?
Returns the middlewares declared directly on the registered page matching name, excluding middlewares inherited from ancestor pages during route-tree flattening, or null when no registered page matches name.
popHistory<T>(T result) Future<T?>
popModeUntil(String fullRoute, {PopMode popMode = PopMode.history}) Future<void>
Removes routes according to PopMode until it reaches the specific fullRoute, DOES NOT remove the fullRoute
override
popRoute({Object? result, PopMode? popMode}) Future<bool>
Called by the Router when the Router.backButtonDispatcher reports that the operating system is requesting that the current route be popped.
override
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
removePage(GetPage getPage) → void
removeRoute<T>(String name) → void
override
resolveOutletInitialPageAsync(String initialRoute) → ({GetPage? page, bool resolved})
The result of the full — asynchronous — middleware pipeline for an outlet's initialRoute, starting or refreshing that resolution in the background (#1978).
runMiddleware(RouteDecoder config) Future<RouteDecoder?>
setInitialRoutePath(RouteDecoder configuration) Future<void>
Called by the Router at startup with the structure that the RouteInformationParser obtained from parsing the initial route.
inherited
setNewRoutePath(RouteDecoder configuration) Future<void>
Handles a route reported by the platform (a deep link, or the browser back/forward buttons on Flutter Web).
override
setRestoredRoutePath(RouteDecoder configuration) Future<void>
Called by the Router during state restoration.
inherited
to<T>(Widget page(), {bool? opaque, Transition? transition, Curve? curve, Duration? duration, String? id, String? routeName, bool fullscreenDialog = false, Object? arguments, List<Binding> bindings = const [], bool preventDuplicates = true, bool? popGesture, bool showCupertinoParallax = true, double gestureWidth(BuildContext context)?, CustomTransition? customTransition, bool rebuildStack = true, PreventDuplicateHandlingMode preventDuplicateHandlingMode = PreventDuplicateHandlingMode.reorderRoutes}) Future<T?>
override
toNamed<T>(String page, {Object? arguments, String? id, bool preventDuplicates = true, Map<String, String>? parameters}) Future<T?>
override
toNamedAndOffUntil<T>(String page, bool predicate(GetPage), [Object? data]) Future<T?>
override
toString() String
A string representation of this object.
inherited

Operators

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