includesScreen method

bool includesScreen(
  1. String screen
)

Implementation

bool includesScreen(String screen) {
  if (routes.isCurrentRouteDisabled ||
      routes.isRouteDisabled(screen) ||
      hasExcludedPopupOpen) {
    return false;
  }
  // The inferred screen name can differ from its navigator route: e.g.
  // HomeScreen on /home. Match the host's route vocabulary when available,
  // and use the detected name only for apps without a named current route.
  final route = routes.currentRoute?.trim();
  final candidate = route == null || route.isEmpty ? screen.trim() : route;
  return includesRoute(candidate);
}