RoutePattern class
A validated, reusable path pattern with whole-segment :parameters.
Matching is case-sensitive and preserves trailing slashes. Literal segments are literal text, not regular expressions. URI segments are decoded once, so an encoded slash remains data inside its original segment.
Constructors
- RoutePattern(String path)
- Creates a pattern such as /users/:id.
Properties
Methods
-
location(
{Map< String, String> parameters = const {}, Map<String, dynamic> ? queryParameters, String? fragment}) → Uri - Generates an encoded URI and rejects missing or unused parameters.
-
match(
String path) → Map< String, String> ? -
matchSegments(
List< String> segments) → Map<String, String> ? - Matches already decoded URI segments without reparsing them.
-
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