matchRoute method

RouteTreeResult? matchRoute(
  1. String path
)

Matches a route by its path.

Implementation

RouteTreeResult? matchRoute(String path) {
  final matchResult = matcher.matchRoute(path);
  if (matchResult != null) {
    final route = tree[matchResult.node.originalPath];
    return RouteTreeResult(route: route, matchResult: matchResult);
  }
  return null;
}