RouteDefinition class

Defines a route with a pattern, segments for matching, and support for wildcards.

Constructors

RouteDefinition(String pattern)

Properties

hashCode int
The hash code for this object.
no setterinherited
isWildcard bool
Whether the route pattern contains a wildcard e.g. '/user/*' will be true
final
pattern String
The route pattern e.g. '/user/:id' e.g. '/user/*' e.g. '/user?foo=bar' e.g. '/user/:id?foo=bar'
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
segments List<String>
The segments of the route pattern e.g. '/user/:id' will be 'user', ':id'
final

Methods

extractParameters(List<String> pathSegments) Map<String, String>
Extracts route parameters from the path segments.
matches(List<String> pathSegments) bool
Checks if a given list of path segments matches this route definition.
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