rawPathParameters property
Raw path parameters extracted from the matched route.
Parameters are defined in route patterns using : prefix (e.g., :id).
The map keys are Symbols of the parameter names, and values are the
extracted strings from the request path.
Example:
router.get('/users/:id', (req) {
final id = req.rawPathParameters[#id]; // Extract 'id' parameter
return Response.ok();
});
Returns an empty map if no parameters were extracted or if the request was not routed through a router.
Implementation
Map<Symbol, String> get rawPathParameters =>
_routingContext[this]?.parameters ?? const <Symbol, String>{};