tryMatchAppRoute method

FRouteMatch? tryMatchAppRoute(
  1. AppRoute<dynamic, RouteParams> route,
  2. RouteParams params, [
  3. Set? checked
])

Implementation

FRouteMatch? tryMatchAppRoute(AppRoute route, RouteParams params,
    [Set? checked]) {
  checked ??= {};
  if (checked.contains(navigatorKey)) {
    return null;
  }
  checked.add(this.navigatorKey);
  final contains = routes.containsRoute(route);
  if (contains) {
    return FRouteMatch.page(AppRouteMatch(route, params), this);
  } else {
    for (var child in _children.values) {
      var childMatch = child.tryMatchAppRoute(route, params, checked);
      if (childMatch != null) {
        return childMatch;
      }
    }
    if (hasParent) {
      log.info(
          "passToParent: [route=${route.route}] ${parent!.navigatorKey}");
      return parent!.tryMatchAppRoute(route, params, checked);
    }
  }

  return null;
}