doesRouteExists function

bool doesRouteExists(
  1. String route
)

Implementation

bool doesRouteExists(String route) {
  try {
    return router.routeInformationParser.configuration
        .findMatch(Uri.parse(route))
        .matches
        .isNotEmpty;
  } catch (err) {
    return false;
  }
}