path<T> method

Future<T> path<T>(
  1. String name
)

The {name} path segment, coerced to T.

The type argument is a coercion, not a cast: path<int>('id') on /todos/abc rejects with 400 before the handler sees anything.

Implementation

Future<T> path<T>(String name) => extractors.path<T>(name).require(this);