push method

Returns a new instance of RouteMatchList with the input match pushed onto the current instance.

Implementation

RouteMatchList push(ImperativeRouteMatch match) {
  if (match.matches.isError) {
    return copyWith(matches: <RouteMatchBase>[...matches, match]);
  }
  return copyWith(
    matches: _createNewMatchUntilIncompatible(matches, match.matches.matches, match),
  );
}