RouteArgs class

Encapsulates arguments for navigation actions.

RouteArgs combines the target route with navigation parameters such as IDs, query parameters, and behavioral flags.

Available extensions

Constructors

RouteArgs(RouteInfo route, {String? id, Map<String, String>? queryParams, Map<String, String>? pathParams, Object? object, RouteArgs? resumeTo, RouteArgs? comingFrom, bool isFromDeeplink = false, bool? pushGlobally, DuplicateRouteBehavior? duplicateBehavior, bool isIdSlug = false, bool? mustBeAuthorized, RoutePolicy? policy})
Creates navigation arguments for the provided route.
const
RouteArgs.fromUri(RouteInfo route, Uri uri)
Build RouteArgs from a Uri and a RouteInfo with a path template.
factory

Properties

comingFrom → RouteArgs?
The originating route for this navigation.
final
duplicateBehavior → DuplicateRouteBehavior?
How to handle navigation when the route already exists in the stack.
final
effectiveDuplicateBehavior → DuplicateRouteBehavior
Resolves the effective duplicate behavior.
no setter
effectiveIsPopupRoute → bool
Resolves the effective popup route setting.
no setter
effectiveMustBeAuthorized → bool
Resolves the effective authorization requirement.
no setter
effectivePushGlobally → bool
Resolves the effective global push setting.
no setter
hashCode → int
The hash code for this object.
no setterinherited
id → String?
Optional ID parameter (e.g., from path '/users/:id').
final
Whether this navigation originated from a deep link.
final
isIdSlug → bool
Whether the ID is a user-friendly slug vs numeric ID.
final
mustBeAuthorized → bool?
Authorization override for this navigation.
final
object → Object?
Arbitrary data to pass to the route.
final
pathParams → Map<String, String>?
Named path parameters extracted from the route's path template.
final
policy → RoutePolicy?
Policy override for this navigation.
final
props → List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
pushGlobally → bool?
Whether to use the root navigator instead of nested navigators.
final
queryParams → Map<String, String>?
Query parameters from the URI.
final
requiresAuth → bool

Available on RouteArgs?, provided by the RouteArgsX extension

Returns true when the underlying route requires authorization.
no setter
resumeTo → RouteArgs?
Optional resume intent.
final
route → RouteInfo
The target route to navigate to.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stringify → bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

cleared() → RouteArgs
Returns a copy with navigation context preserved but flow metadata cleared.
copyWith({RouteInfo? route, String? id, Map<String, String>? pathParams, Map<String, String>? queryParams, Object? object, RouteArgs? resumeTo, RouteArgs? comingFrom, bool? isFromDeeplink, bool? pushGlobally, DuplicateRouteBehavior? duplicateBehavior, bool? isIdSlug, bool? mustBeAuthorized, RoutePolicy? policy}) → RouteArgs
Create a copy with overridden fields.
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