allows method

bool allows(
  1. String? routeName
)

Whether routeName is declared (or conforming by construction).

Implementation

bool allows(String? routeName) {
  if (routeName == null || routeName.isEmpty) return true;
  if (routeName == navigatorRootRoute) return true;
  return _allowedRoutes.contains(routeName);
}