RouteMatch<T> class

This is the result returned by RouteMatcher when a match is found

Annotations

Constructors

RouteMatch({required AutoRoute config, required List<String> segments, required String stringMatch, required LocalKey key, List<RouteMatch>? children, T? args, Parameters params = const Parameters({}), Parameters queryParams = const Parameters({}), String fragment = '', String? redirectedFrom, bool autoFilled = false})
Default constructor

Properties

allowSnapshotting → bool
Helper to access AutoRoute.allowSnapshotting
no setter
args → T?
The typed args extracted from PageRouteInfo.args
final
autoFilled → bool
Whether this matched is a result of RouteMatcher.buildPathTo
final
children → List<RouteMatch>?
The list of child matches of this match
final
evaluatedGuards → List<AutoRouteGuard>
Holds a list of already evaluated guards for this match before it enter guard process
no setter
flattened → List<RouteMatch>
Returns a flattened list of this match and it's sub-matches e.g if we have = RouteMatch1[RouteMatch2RouteMatch3] the result is RouteMatch1,RouteMatch2,RouteMatch3
no setter
fragment → String
The url fragment form Uri.fragment
final
fromRedirect → bool
Whether this match is a result of a RedirectRoute
no setter
fullPath → String
Joins all segments to a valid path
no setter
fullscreenDialog → bool
Helper to access AutoRoute.fullscreenDialog
no setter
guards → List<AutoRouteGuard>
The list of AutoRouteGuard's this route will go through before being presented
no setter
hasChildren → bool
Whether this match has nested child-matches
no setter
hasEmptyPath → bool
Whether the matched-entry has an empty path
no setter
hashCode → int
The hash code for this object.
no setteroverride
id → LocalKey
The unique key of this match
final
isBranch → bool
Whether is route is a parent route
no setter
keepHistory → bool
Helper to access AutoRoute.keepHistory
no setter
key → LocalKey
The page key to be used in AutoRoutePage.canUpdate
final
maintainState → bool
Helper to access AutoRoute.maintainState
no setter
meta → Map<String, dynamic>
Helper to access AutoRoute.meta
no setter
name → String
The name of matched route-entry
no setter
params → Parameters
The extracted path params either from rawPath or PageRouteInfo implementation
final
path → String
The path of matched route-entry
no setter
pathParams → Parameters
The path parameters of the route
no setter
queryParams → Parameters
The extracted path params either from rawPath or PageRouteInfo implementation
final
redirectedFrom → String?
If this match is a result of a RedirectRoute this will be populated with that route's path
final
restorationId → RestorationIdBuilder?
Helper to access AutoRoute.restorationId
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
segments → List<String>
The expended path segments of this match
final
stringMatch → String
The expended path of this match e.g path = /path/:id => stringMatch = 'path/1'
final
titleBuilder → TitleBuilder?
Helper to access AutoRoute.title
no setter
type → RouteType?
Helper to access AutoRoute.type
no setter

Methods

allSegments({bool includeEmpty = false}) → List<String>
Collects top-most matched segments from all child-matches
buildPage<R>(RouteData data) → AutoRoutePage<R>
Helper to access AutoRoute.buildPage
copyWith({String? stringMatch, Parameters? pathParams, Parameters? queryParams, List<RouteMatch>? children, String? fragment, List<String>? segments, String? redirectedFrom, Object? args, LocalKey? key, AutoRoute? config, bool? autoFilled, List<AutoRouteGuard>? evaluatedGuards}) → RouteMatch
Returns a new instance of RouteMatch with the overridden values
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toPageRouteInfo() → PageRouteInfo<Object?>
Returns a new instance of PageRouteInfo from the current RouteMatch instance
toString() → String
A string representation of this object.
override
withId(LocalKey newId) → RouteMatch
Returns a new instance of RouteMatch with the overridden id

Operators

operator ==(Object other) → bool
The equality operator.
override