StandardAppRouterContext extension
An extension class that adds the Router functionality of StandardApp to BuildContext.
- on
Properties
-
nestedPageInstances
→ Map<
StandardPageInterface< Object?, Object?> , List<StandardPageInterface< >Object?, Object?> > -
Available on BuildContext, provided by the StandardAppRouterContext extension
The current nested page instances within each navigator.no setter -
pageInstances
→ List<
StandardPageInterface< Object?, Object?> > -
Available on BuildContext, provided by the StandardAppRouterContext extension
The current Page history.no setter -
rootPageInstances
→ List<
StandardPageInterface< Object?, Object?> > -
Available on BuildContext, provided by the StandardAppRouterContext extension
The root Navigator's current page instances.no setter - router → Router
-
Available on BuildContext, provided by the StandardAppRouterContext extension
Retrieves the Router.no setter
Methods
-
getPageFactory<
T extends StandardPageWithResult< (R, E> , R extends Object?, E extends Object?>) → StandardPageWithResultFactory< T, R, E> -
Available on BuildContext, provided by the StandardAppRouterContext extension
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> -
Available on BuildContext, provided by the StandardAppRouterContext extension
Navigate to the StandardPage of typeTwith 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. -
goWithResult<
T extends StandardPageWithResult< (R, E> , R extends Object?, E extends Object?>R pageData, [bool pushParentPage = false]) → Future< E?> -
Available on BuildContext, provided by the StandardAppRouterContext extension
Navigate to the StandardPageWithResult of typeTthat 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. -
removeRoute(
[Object? result]) → void -
Available on BuildContext, provided by the StandardAppRouterContext extension
If the route corresponds to a StandardPageInterface, it performs necessary cleanup and updates the page stack accordingly. If the route does not correspond to a StandardPageInterface, it directly removes the route from the navigator. -
route(
String location, []) → void -
Available on BuildContext, provided by the StandardAppRouterContext extension
Navigate to a page with the specifiedlocation.navigationModerepresents the mode of StandardPageNavigationMode to use during navigation (optional).pushParentPageindicates whether to push the parent page when navigating to a child page. default istrue.