RouteDefinition class
Definition of a single route pattern Used to define how URLs should be matched and handled
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
Unique name for the route
final
-
Callback for navigation
final
-
parameterNames
→ Map<
String, bool> ? -
Map of expected parameter names with their required status
key = parameter name, value = is required?
Example: {'clubId': true, 'tab': false}
If a required parameter is missing, the URL is treated as external link
final
-
parameterNamesList
→ List<
String> -
Get the list of parameter names in order
no setter
- pattern → String
-
Regex pattern to match the URL path
Examples:
final
- regex → RegExp
-
Get the compiled regex
no setter
-
requiredParameterNames
→ List<
String> -
Get only the required parameter names
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
matchPath(
String path) → Map< String, String> ? - Try to match a path and extract parameters Returns null if path doesn't match or required params are missing
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validateParameters(
Map< String, String> extractedParams) → bool - Validate that all required parameters are present and non-empty
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited