StandardRouterDelegate class
A class that implements RouterDelegate required for Patapata's Router.
- Inheritance
-
- Object
- Listenable
- RouterDelegate<
StandardRouteData> - StandardRouterDelegate
- Mixed-in types
Constructors
-
StandardRouterDelegate({required BuildContext context, required List<
StandardPageWithResultFactory< pageFactories, StandardAppType appType = StandardAppType.material, Widget routableBuilder(BuildContext context, Widget? child)?, void onDidRemovePage(Page page)?})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
-
Retrieves the current
Navigator.no setter -
Retrieves the
BuildContextof the current Navigator.no setter -
Retrieves the current
NavigatorKey.no setter -
currentPage
→ StandardPageInterface<
Object?, Object?> ? -
Retrieves the current
StandardPageInterface.no setter -
defaultRootPageFactory
→ StandardPageWithResultFactory<
StandardPageWithResult< Object?, Object?> , Object?, Object?> -
Get the default root page factory.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
-
Retrieves the root
Navigator.no setter -
Retrieves the
BuildContextof the root Navigator.no setter -
Retrieves the root
NavigatorKey.no setteroverride -
nestedPageInstances
→ Map<
StandardPageInterface< Object?, Object?> , List<StandardPageInterface< >Object?, Object?> > -
The current nested page instances within each navigator.
no setter
- onDidRemovePage ↔ void Function(Page page)?
-
A function called when a page is removed from the navigator.
getter/setter pair
-
pageInstances
→ List<
StandardPageInterface< Object?, Object?> > -
The current Page history.
no setter
-
rootPageInstances
→ List<
StandardPageInterface< Object?, Object?> > -
The root Navigator's current page instances.
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
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.
Tis the type of the destination page.Ris the type of page data.Eis the data type of the value that the page returns. -
go<
T extends StandardPage< (R> , R extends Object?>R pageData, [bool pushParentPage = false]) → Future< void> -
Navigate to the StandardPage of type
Twith the option to passpageDataduring navigation.Trepresents the type of the destination page, andRsignifies the type of page data.navigationModeis an optional mode of StandardPageNavigationMode to use during navigation.pushParentPageindicates whether to push the parent page when navigating to a child page. default isfalse. -
goErrorPage(
ReportRecord record, [bool pushParentPage = false]) → void -
Navigate to the error page with the option to pass an error log information
record.recordrepresents the error log information to be passed to the error page.navigationModeis an optional mode of StandardPageNavigationMode to use during navigation.pushParentPageindicates whether to push the parent page when navigating to a child page. default isfalse. -
goWithResult<
T extends StandardPageWithResult< (R, E> , R extends Object?, E extends Object?>R pageData, [bool pushParentPage = false]) → Future< E?> -
Navigate to the StandardPageWithResult of type
Tthat returns a value, with the option to passpageDataduring the navigation.Tis the type of the destination page.Ris the type of page data.Eis the data type of the value that the page returns.navigationModeis optional and represents the mode of StandardPageNavigationMode to use during navigation.pushParentPageindicates whether to push the parent page when navigating to a child page. default isfalse. -
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, Object? result) → void -
Removes the specified
routefrom the navigation stack. -
routeWithConfiguration(
StandardRouteData configuration, [bool pushParentPage = true]) → void -
Takes
StandardRouteDatadata and performs page navigation. This function is used when a reference to context is not available, for example, when navigating from a plugin.configurationrepresents the page data to be passed to goWithResult,navigationModeis an optional mode of StandardPageNavigationMode to use during navigation.pushParentPageindicates whether to push the parent page when navigating to a child page. default istrue. -
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