pathParameters property

PathParameters get pathParameters

Typed path parameters extracted from the matched route.

Parameters are defined in route patterns using : prefix (e.g., :id). Access with PathParam.

Example:

const idParam = IntPathParam(#id);
router.get('/users/:id', (req) {
  final id = req.pathParameters.get(idParam); // typed as int
  return Response.ok();
});

Implementation

PathParameters get pathParameters =>
    _pathParameters[this] ??= PathParameters(rawPathParameters);