findMatch method
Implementation
RouteMatchV1? findMatch(RouteSettings settings) {
var matcher = RouteMatcher(settings);
for (var route in routes) {
var match = matcher.match(route);
if (match != null) {
// matching root "/" must be exact
if ((route.template == "/" || route.template.isEmpty) &&
match.hasRest) {
continue;
}
return match;
}
}
return null;
}