RouteNavigator class abstract
High level navigation operations over the current route tree.
RouteNavigator exposes familiar push, pop and replace primitives, as well as helpers to update a node's arguments, extra data and children.
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
canPop(
) → bool - Determines if there are any routes that can be popped from the stack.
-
maybePop(
) → void - Remove the top route from the navigation stack. If there is only one route in the stack, nothing will happen.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pop(
) → void - Remove one of the top routes from the navigation stack. If there is only one route in the stack, it throws a StateError.
-
popAll(
) → void - Remove all routes from the navigation stack except for the first one. If there is only one route in the stack, nothing will happen.
-
popUntil(
RouteNodePredicate< RouteNode> predicate) → void -
Pops routes off the stack until a route satisfying
the
predicateis reached. -
popWhere(
RouteNodePredicate< RouteNode> predicate) → void -
Removes a route from the stack if the route matches
the
predicatecondition. -
push(
YxRoute route, {Map< String, String> ? arguments, Map<String, Object?> ? extra}) → void -
Pushes a new
routeonto the navigation stack. -
pushAll(
List< ({Map< routes) → voidString, String> ? arguments, Map<String, Object?> ? extra, YxRoute route})> -
Pushes multiple
routesonto the navigation stack. -
pushAndRemoveUntil(
YxRoute route, RouteNodePredicate< RouteNode> predicate, {Map<String, String> ? arguments, Map<String, Object?> ? extra}) → void -
Pushes a new
routeonto the stack and removes all routes until apredicatecondition is met. -
pushNode(
RouteNode node) → void -
Pushes a new
nodeonto the navigation stack. -
pushReplacement(
YxRoute route, {Map< String, String> ? arguments, Map<String, Object?> ? extra}) → void -
Replaces the current route with a new
route. -
setArguments(
Map< String, String> arguments) → void -
Sets the
argumentsfor the current route. -
setChildren(
Iterable< RouteNode> children) → void -
Sets the
childrenfor the current route. -
setExtra(
Map< String, Object?> extra) → void -
Sets the
extradata for the current route. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited