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 pathParams = const Parameters({}), Parameters queryParams = const Parameters({}), String fragment = '', String? redirectedFrom, bool autoFilled = false}) -
Default constructor
const
Properties
- 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
-
flattened
→ List<
RouteMatch> -
Returns a flattened list of this match and it's sub-matches
e.g if we have = RouteMatch1[RouteMatch2
RouteMatch3
] the result isRouteMatch1,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 presentedno 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
- 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
- path → String
-
The path of matched route-entry
no setter
- pathParams → Parameters
-
The extracted path params either from rawPath or
PageRouteInfo implementation
final
- 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
-
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}) → 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 - Returns a new instance of PageRouteInfo from the current RouteMatch instance
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override