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

hashCode → int
The hash code for this object.
no setterinherited
parameters ↔ Set<String>
latefinal
path → String
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
signature → String
Detects equivalent, ambiguous patterns at registration.
no setter

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