Shelf (package:shelf_router/shelf_router.dart) is the foundational
Dart HTTP server library. The Router API exposes a method per
verb (router.get, router.post, ...) and a mount('/prefix', subRouter) composition primitive. Handlers are typically wired
with cascade operators on a fresh Router():
Direct method calls (router.get('/foo', _handler)) and .all(...)
— which registers a handler against every verb — are also
supported. Path captures use angle brackets (<id>, <id|[0-9]+>)
which we surface as {id} path params.
Mounts are resolved across files: a Router variable mounted under
/prefix contributes its routes (recursively) under that prefix in
the parent router. Each top-level router (not mounted anywhere) is
emitted as a separate set of endpoints.
Matches the official @Route.<verb>('/path') annotation and the
shelf_router_classes@Route('VERB', '/path') variant. Capture 1
is the dotted verb (nil for the string-arg form).