StandardAppRouterContext extension
An extension class that adds the Router functionality of StandardApp to BuildContext.
- on
Properties
-
pageChildInstances
→ Map<
StandardPageInterface< Object?, Object?> , List<Page> > -
Available on BuildContext, provided by the StandardAppRouterContext extension
Get a List of the actual pages of Page.no setter -
pageInstances
→ List<
Page> -
Available on BuildContext, provided by the StandardAppRouterContext extension
The currentPagehistory.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, []) → 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. -
goWithResult<
T extends StandardPageWithResult< (R, E> , R extends Object?, E extends Object?>R pageData, []) → 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. -
removeRoute(
) → void -
Available on BuildContext, provided by the StandardAppRouterContext extension
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, andresultsignifies the result passed as an argument to Route.didPop. -
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).