copyWith method

  1. @internal
ShellRouteMatch copyWith({
  1. required List<RouteMatchBase>? matches,
})

Creates a new shell route match with the given matches.

This is typically used when pushing or popping RouteMatchBase from RouteMatchList.

Implementation

@internal
ShellRouteMatch copyWith({
  required List<RouteMatchBase>? matches,
}) {
  return ShellRouteMatch(
    matches: matches ?? this.matches,
    route: route,
    matchedLocation: matchedLocation,
    pageKey: pageKey,
    navigatorKey: navigatorKey,
  );
}