isRouteNamedArg method

bool isRouteNamedArg(
  1. String name
)

Check if the route is a named argument.

Implementation

bool isRouteNamedArg(String name) {
  return _routeNameMappings.entries.where((test) {
    RegExp regExp = RegExp(r"{(.*?)}");
    return regExp.hasMatch(test.key);
  }).where((test) {
    final matcher = RouteMatcher(test.key);
    final RouteMatch? match = matcher.findMatch(_routeNameMappings);
    return match != null;
  }).isNotEmpty;
}