nextNodeFromUrl method

RouteNode<RouteValue>? nextNodeFromUrl(
  1. UrlData url
)

Finds a route that matches the url among its children and returns a stack created from it.

Implementation

RouteNode? nextNodeFromUrl(UrlData url) {
  if (url.segments.isEmpty) {
    return null;
  }

  final next = HyperRoute.matchUrl(url: url, routes: children);
  if (next == null) {
    throw UrlParsingException(url: url);
  }
  return next;
}