RouteMatchList class

The list of RouteMatchBase objects.

This can contains tree structure if there are ShellRouteMatch in the list.

This corresponds to the GoRouter's history.

Mixed-in types
Annotations

Constructors

RouteMatchList({required List<RouteMatchBase> matches, required Uri uri, Object? extra, GoException? error, required Map<String, String> pathParameters})
RouteMatchList constructor.

Properties

error GoException?
An exception if there was an error during matching.
final
extra Object?
An extra object to pass along with the navigation.
final
fullPath String
the full path pattern that matches the uri.
final
hashCode int
The hash code for this object.
no setteroverride
isEmpty bool
Returns true if there are no matches.
no setter
isError bool
Returns true if the current match intends to display an error screen.
no setter
isNotEmpty bool
Returns true if there are matches.
no setter
last RouteMatch
The last leaf route.
no setter
lastOrNull RouteMatch?
The last leaf route or null if matches is empty
no setter
matches List<RouteMatchBase>
The route matches.
final
pathParameters Map<String, String>
Parameters for the matched route, URI-encoded.
final
routes List<RouteBase>
The routes for each of the matches.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uri Uri
The uri of the current match.
final

Methods

copyWith({List<RouteMatchBase>? matches, Uri? uri, Map<String, String>? pathParameters}) RouteMatchList
Create a new RouteMatchList with given parameter replaced.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
push(ImperativeRouteMatch match) RouteMatchList
Returns a new instance of RouteMatchList with the input match pushed onto the current instance.
remove(RouteMatchBase match) RouteMatchList
Returns a new instance of RouteMatchList with the input match removed from the current instance.
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited
visitRouteMatches(RouteMatchVisitor visitor) → void
Traverse route matches in this match list in preorder until visitor returns false.

Operators

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

Static Properties

empty RouteMatchList
Constructs an empty matches object.
getter/setter pair