router/route_match library

Classes

RouteMatch
A matched route: the pattern that matched, the concrete path, and any extracted path params (e.g. /nodes/:id against /nodes/web-01 yields {id: web-01}).

Functions

hashToPath(String hash) String
Normalizes a URL hash (#/foo) to a path (/foo); empty hash → /.
matchRoute(List<String> patterns, String path) RouteMatch
Matches path against patterns, returning the first match. Patterns use :name segments for parameters. Pure and DOM-free.