nav_router library

Classes

FadeRouteBuilder<T>

Properties

This is the key used for route redirection. It must be set in the materialApp's navigatorKey property. [...]
final

Functions

canPop() bool
Whether the navigator can be popped. [...]
maybePop([dynamic result]) Future
Whether the route can be popped out of the stack, if it can be popped out, otherwise nothing is done. [...]
pop([dynamic result]) → dynamic
Pop the top-most route off the navigator. [...]
popAndPushNamed(dynamic name, [dynamic result]) Future
Pop the current route off the navigator and push a named route in its place. [...]
popToRootPage() → void
Calls pop repeatedly until the predicate returns true. [...]
popUntil(RoutePredicate predicate) → void
Calls pop repeatedly until the predicate returns true. [...]
pushAndRemoveUntil(Widget page, [RouterType type = RouterType.cupertino]) Future
Push the given route onto the navigator, and then remove all the previous routes until the predicate returns true. [...]
pushNamedAndRemoveUntil(String newRouteName) Future
pushNamedAndRemoveUntil("/screen4",ModalRoute.withName('/')
pushReplacement(Widget page, [RouterType type = RouterType.cupertino]) Future
Replace the current route of the navigator by pushing the given route and then disposing the previous route once the new route has finished animating in. [...]
pushReplacementNamed(dynamic routeName, [dynamic result]) Future
The routing stack is replaced by the routing name. [...]
removeRoute(Route route) → void
Immediately remove route from the navigator, and Route.dispose it. [...]
removeRouteBelow(Route anchorRoute) → void
Immediately remove a route from the navigator, and Route.dispose it. The route to be replaced is the one below the given anchorRoute. [...]
replaceRouteBelow<T extends Object>({Route anchorRoute, Route<T> newRoute}) → void
Replaces a route on the navigator with a new route. The route to be replaced is the one below the given anchorRoute. [...]
replaceRouter<T extends Object>({Route oldRoute, Route<T> newRoute}) → void
Replaces a route on the navigator with a new route. [...]
routePush(Widget page, [RouterType type = RouterType.cupertino]) Future
The direct route jump method can also directly set the route jump mode. [...]
routePushAdvance({Widget exitPage, Widget enterPage, AdvanceType type: AdvanceType.slide}) Future
exitPage is generally itself enter page is the page you want to enter
routePushName(String name) Future
The route is redirected by the route name, which can be used by directly passing in the route name. [...]

Enums

AdvanceType
Advanced usage d route enumeration enum type
RouterType
Enumerated type of route jump

Typedefs

This is a callback for passing data.It can call back any type of data, and use it as a type in the class and then return the data. See the use of de in the example.