matchUrl static method
RouteNode<RouteValue> ?
matchUrl({
- required UrlData url,
- required List<
HyperRoute< routes,RouteValue> >
Finds a route that matches the url and creates a stack from it.
Implementation
static RouteNode? matchUrl({
required UrlData url,
required List<HyperRoute> routes,
}) {
if (url.segments.isEmpty) {
return null;
}
for (final route in routes) {
final node = route.createFromUrl(url);
if (node != null) {
return node;
}
}
return null;
}