FFRouterDelegate class
A delegate that is used by the Router widget to build and configure a navigating widget.
- Inheritance
-
- Object
- Listenable
- RouterDelegate<
RouteSettings> - FFRouterDelegate
- Mixed in types
Constructors
-
FFRouterDelegate({required GetRouteSettings getRouteSettings, PopPageCallback? onPopPage, List<
NavigatorObserver> ? observers, PageWrapper? pageWrapper, TransitionDelegate transitionDelegate = const DefaultTransitionDelegate<dynamic>(), Widget? notFoundWidget})
Properties
- currentConfiguration → RouteSettings?
-
Called by the Router when it detects a route information may have
changed as a result of rebuild.
no setteroverride
- getRouteSettings → GetRouteSettings
-
The getRouteSettings method which is created by
ff_annotation_route
final - hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
-
The key used for retrieving the current navigator
final
-
no setter
-
The wrapper of Navigator
final
- notFoundWidget → Widget?
-
If the page is not found, it's the default page
final
-
observers
→ List<
NavigatorObserver> ? -
A list of observers for this navigator.
final
- onPopPage → PopPageCallback?
-
Whether this navigator should report route update message back to the
engine when the top-most route changes.
final
-
pages
→ List<
FFPage> -
The current pages of navigator
no setter
- pageWrapper → PageWrapper?
-
The wrapper of Page, you can redefine page in this call back
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- transitionDelegate → TransitionDelegate
-
The delegate used for deciding how routes transition in or off the screen
during the pages updates.
final
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
build(
BuildContext context) → Widget -
Called by the Router to obtain the widget tree that represents the
current state.
override
-
canPop(
) → bool? - navigator pop Whether the navigator that most tightly encloses the given context can be popped.
-
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
inherited
-
getRoutePage<
T extends Object?> ({required String name, Map< String, dynamic> ? arguments}) → FFPage<T?> -
getUniqueKey(
) → UniqueKey - Unique Key for Page
-
maybePop<
T extends Object?> ([T? result]) → Future< bool> - Consults the current route's Route.willPop method, and acts accordingly, potentially popping the route as a result; returns whether the pop request should be considered handled.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
pop<
T extends Object?> ([T? result]) → void - Pop the top-most route off the navigator that most tightly encloses the given context.
-
popAndPushNamed<
T extends Object?> (String routeName, {T? result, Map< String, dynamic> ? arguments}) → Future<T?> - Pop the current route off the navigator and push a named route in its place.
-
popRoute(
) → Future< bool> -
RootBackButtonDispatcher / ChildBackButtonDispatcher
Called by the Router when the Router.backButtonDispatcher reports that
the operating system is requesting that the current route be popped.
override
-
popUntil(
PagePredicate predicate) → void - Calls pop repeatedly on the navigator that most tightly encloses the given context until the predicate returns true.
-
push<
T extends Object?> (FFPage< T?> page) → Future<T?> - Push the given page onto the navigator.
-
pushAndRemoveUntil<
T extends Object?> (FFPage< T?> newPage, PagePredicate predicate) → Future<T?> -
Push the given page onto the navigator that most tightly encloses the
given context, and then remove all the previous routes until the
predicate
returns true. -
pushNamed<
T extends Object?> (String routeName, {Map< String, dynamic> ? arguments}) → Future<T?> - pop push Push a named route onto the navigator that most tightly encloses the given context.
-
pushNamedAndRemoveUntil<
T extends Object?> (String newRouteName, PagePredicate predicate, {Map< String, dynamic> ? arguments}) → Future<T?> -
Push the route with the given name onto the navigator that most tightly
encloses the given context, and then remove all the previous routes until
the
predicate
returns true. -
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
setInitialRoutePath(
RouteSettings configuration) → Future< void> -
Called by the Router at startup with the structure that the
RouteInformationParser obtained from parsing the initial route.
inherited
-
setNewRoutePath(
RouteSettings configuration) → Future< void> -
Called by the Router when the Router.routeInformationProvider reports that a
new route has been pushed to the application by the operating system.
override
-
setRestoredRoutePath(
RouteSettings configuration) → Future< void> -
Called by the Router during state restoration.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updatePages(
) → void - push navigator call this after you change pages
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
of(
BuildContext context) → FFRouterDelegate - Retrieves the immediate RouterDelegate ancestor from the given context.