NavigationPath class
An immutable object that represents a path for navigation. When a named route is pushed with
Navigator.pushNamed
, the route name is matched with the NavigationPath.matcher.
If there is a match with this, then this builder will be returned for construction of primary widgets of a route.
Example:
NavigationPath(
matcher: (route) => route?.name == ProfileAndMore.route,
builder: (_, __) {
return const Example();
},
),
- Implemented types
- Implementers
- Annotations
Constructors
-
const
Properties
- builder → PathWidgetBuilder
-
Builds the primary contents of the route.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- matcher → RouteMatcherCallback
-
When a named route is pushed with
Navigator.pushNamed
, the route name is matched using this matcher.final - routeBuilder → RouteBuilder?
-
Builder to optionally create a Route to be navigated. Useful when builder is not enough and you need to create a Route with custom transitions.
final
- routeSettings → RouteSettingsBuilder?
-
An builter to optional create/modify data that might be useful in constructing a Route.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{RouteMatcherCallback? matcher, PathWidgetBuilder? builder, RouteSettingsBuilder? routeSettings, RouteBuilder? routeBuilder}) → NavigationPath -
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