StandardRouterDelegate class
A class that implements RouterDelegate required for Patapata's Router.
- Inheritance
-
- Object
- Listenable
- RouterDelegate<
StandardRouteData> - StandardRouterDelegate
- Mixed-in types
Constructors
-
StandardRouterDelegate.new({required BuildContext context, required List<
StandardPageWithResultFactory< pageFactories, Widget routableBuilder(BuildContext context, Widget? child)?, bool willPopPage(Route route, dynamic result)?})StandardPageWithResult< >Object?, Object?> , Object?, Object?> - Create a StandardRouterDelegate
Properties
- context → BuildContext
-
A handle to the location of a widget in the widget tree.
final
- currentConfiguration → StandardRouteData?
-
Called by the Router when it detects a route information may have
changed as a result of rebuild.
no setteroverride
-
defaultRootPageFactory
→ StandardPageWithResultFactory<
StandardPageWithResult< Object?, Object?> , Object?, Object?> -
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
-
Retrieves the current
Navigator
.no setter -
Retrieves the
BuildContext
of the Navigator.no setter -
The key used for retrieving the current navigator.
no setteroverride
-
pageInstances
→ List<
Page> -
The current Page history.
no setter
- routableBuilder ↔ Widget Function(BuildContext context, Widget? child)?
-
Wrap the entire Patapata Navigator-related application,
enabling the use of screen transition-related functionalities through a function.
getter/setter pair
-
routeObserver
→ RouteObserver<
ModalRoute< void> > -
Navigator observer that notifies RouteAware of changes in route state.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- willPopPage ↔ bool Function(Route route, dynamic result)?
-
A function called when the app goes back to the previous page.
getter/setter pair
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
-
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
-
getPageFactory<
T extends StandardPageWithResult< (R, E> , R extends Object?, E extends Object?>) → StandardPageWithResultFactory< T, R, E> -
Get the factory class StandardPageWithResultFactory of StandardPageWithResult.
T
is the type of the destination page.R
is the type of page data.E
is the data type of the value that the page returns. -
go<
T extends StandardPage< (R> , R extends Object?>R pageData, [ ]) → Future< void> -
Navigate to the StandardPage of type
T
with the option to passpageData
during navigation.T
represents the type of the destination page, andR
signifies the type of page data. -
goErrorPage(
ReportRecord record, [ ]) → void -
Navigate to the error page with the option to pass an error log information
record
.record
represents the error log information of type ReportRecord to pass, andnavigationMode
signifies the optional mode of StandardPageNavigationMode to use during navigation. -
goWithResult<
T extends StandardPageWithResult< (R, E> , R extends Object?, E extends Object?>R pageData, [ ]) → Future< E?> -
Navigate to the StandardPageWithResult of type
T
that returns a value, with the option to passpageData
during the navigation.T
is the type of the destination page.R
is the type of page data.E
is the data type of the value that the page returns.navigationMode
is optional and represents the mode of StandardPageNavigationMode to use during navigation. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
popRoute(
) → Future< bool> -
Called by the Router when the Router.backButtonDispatcher reports that
the operating system is requesting that the current route be popped.
inherited
-
processInitialRoute(
) → Future< void> - Selects the initial page that the application should display and navigates to that page. If this initialization has already been performed, it does nothing.
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
removeRoute(
Route route, dynamic result) → bool -
Removes the provided
route
from the navigator and returns true if it is successfully removed, or false if not found. If the route is removed successfully, it will trigger Route.didPop.route
represents the removed Route, andresult
signifies the result passed as an argument to Route.didPop. -
routeWithConfiguration(
StandardRouteData configuration, [ ]) → void -
Takes
StandardRouteData
data and performs page navigation. This function is used when a reference to context is not available, for example, when navigating from a plugin.configuration
represents the page data to be passed to goWithResult,navigationMode
is an optional mode of StandardPageNavigationMode to use during navigation. -
setInitialRoutePath(
StandardRouteData configuration) → Future< void> -
Called by the Router at startup with the structure that the
RouteInformationParser obtained from parsing the initial route.
inherited
-
setNewRoutePath(
StandardRouteData 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(
StandardRouteData configuration) → Future< void> -
Called by the Router during state restoration.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited