NyNavigator class
The NyNavigator class is a singleton class that manages the routing of the application. It is a thin layer on top of Navigator to help you encapsulate and manage routing at one place.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
prefixRoutes
↔ Map<
String, String> -
Prefix routes
getter/setter pair
- router ↔ NyRouter
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → NyNavigator
-
final
Static Methods
-
updateStack(
List< String> routes, {bool replace = true, Map<String, dynamic> ? dataForRoute}) → dynamic -
Update the stack on the router.
routes
is a list of routes to navigate to. E.g.HomePage.path, SettingPage.path
replace
is a boolean that determines if the current route should be replaced.dataForRoute
is a map of data to pass to the route. E.g. {HomePage.path: {"name": "John Doe"}} Example: