RouteUnique mixin
Base mixin for unique routes in the application.
Most routes should mix this in. It provides integration with the Coordinator and layout system.
Role in Navigation Flow
RouteUnique enables routes to participate in coordinator-based navigation:
- Implements RouteUri for URI-based identification
- Can be resolved by Coordinator.parseRouteFromUri
- Can be bound to a RouteLayout via the layout getter
- Creates parent layouts via createParentLayout
This is the most common mixin for application routes.
- Superclass constraints
- Implemented types
- Mixin applications
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- identifier → Uri
-
The unique identifier for this route.
no setteroverride
- isPopByPath ↔ bool
-
Whether the pop was initiated by the path mechanism.
getter/setter pairinherited
- layout → Type?
-
The type of layout that wraps this route.
no setter
-
onResult
→ Completer<
Object?> -
no setterinherited
- parentLayoutKey → Object?
-
no setteroverride
-
props
→ List<
Object?> -
Properties used for equality comparison.
no setterinherited
- resultValue → Object?
-
The result value passed when this route was popped.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
stackPath
→ StackPath<
RouteTarget> ? -
The StackPath that contains this route.
no setterinherited
Methods
-
bindResultValue(
Object? value) → void -
inherited
-
bindStackPath(
StackPath< RouteTarget> path) → void -
Binds the route to a path.
inherited
-
build(
covariant CoordinatorCore< RouteUri> coordinator, BuildContext context) → Widget - Builds the widget for this route.
-
clearStackPath(
) → void -
Clears the path binding.
inherited
-
compareWith(
Object other) → bool -
Compares this object with another for equality.
inherited
-
completeOnResult(
Object? result, covariant CoordinatorCore< RouteUri> ? coordinator, [bool failSilent = false]) → void -
Completes the route's result future.
inherited
-
createParentLayout(
covariant CoordinatorCore< RouteUri> coordinator) → RouteLayout<RouteUnique> -
Creates a new RouteLayoutParent instance for this route.
override
-
deepEquals(
RouteTarget other) → bool -
Whether
otheris the same lifecycle entry as this route.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onDidPop(
Object? result, covariant CoordinatorCore< RouteUri> ? coordinator) → void -
inherited
-
onDiscard(
) → void -
Called when the route is discarded without being displayed.
inherited
-
onUpdate(
covariant RouteTarget newRoute) → void -
Called when this route is updated with state from a new route instance.
inherited
-
resolveParentLayout(
covariant CoordinatorCore< RouteUri> coordinator) → RouteLayout<RouteUnique> ? -
Resolves the active or creates a new RouteLayoutParent for this route.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
toUri(
) → Uri -
Converts this route to a Uri for URL representation.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited