allows method
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);
}