getHybridRouterView method

RouterLinkElement? getHybridRouterView(
  1. String path
)

Implementation

RouterLinkElement? getHybridRouterView(String path) {
  // First try exact match (for static routes)
  if (_hybridRouterViews.containsKey(path)) {
    return _hybridRouterViews[path] as RouterLinkElement?;
  }

  // Then try pattern matching for dynamic routes
  for (String pattern in _hybridRouterViews.keys) {
    if (pattern.contains(':')) {
      // This is a dynamic route pattern like "/user/:userId"
      if (_matchesPattern(pattern, path)) {
        return _hybridRouterViews[pattern] as RouterLinkElement?;
      }
    }
  }

  return null;
}