match method

RouteMatches? match(
  1. Uri location
)

Matches location, returning null when no complete branch matches.

Implementation

RouteMatches? match(Uri location) {
  if (!location.hasAbsolutePath) {
    throw ArgumentError.value(
      location,
      'location',
      'Route locations must have an absolute path.',
    );
  }
  final found = _router.find(_pathname(location));
  if (found == null) return null;
  return _decode(location, found.data, found.params);
}