copyWith method

  1. @override
ReevaluatableRouteMatch<T, R> copyWith({
  1. String? stringMatch,
  2. Parameters? pathParams,
  3. Parameters? queryParams,
  4. List<RouteMatch>? children,
  5. String? fragment,
  6. List<String>? segments,
  7. String? redirectedFrom,
  8. Object? args,
  9. LocalKey? key,
  10. AutoRoute? config,
  11. bool? autoFilled,
  12. List<AutoRouteGuard>? evaluatedGuards,
})
override

Returns a new instance of RouteMatch with the overridden values

Implementation

@override
ReevaluatableRouteMatch<T, R> copyWith({
  String? stringMatch,
  Parameters? pathParams,
  Parameters? queryParams,
  List<RouteMatch>? children,
  String? fragment,
  List<String>? segments,
  String? redirectedFrom,
  Object? args,
  LocalKey? key,
  AutoRoute? config,
  bool? autoFilled,
  List<AutoRouteGuard>? evaluatedGuards,
}) {
  return ReevaluatableRouteMatch<T, R>(
    currentPage: currentPage,
    originalMatch: super.copyWith(
      stringMatch: stringMatch,
      pathParams: pathParams,
      queryParams: queryParams,
      children: children,
      fragment: fragment,
      segments: segments,
      redirectedFrom: redirectedFrom,
      args: args,
      key: key,
      config: config ?? _config,
      autoFilled: autoFilled ?? this.autoFilled,
      evaluatedGuards: evaluatedGuards ?? _evaluatedGuards,
    ),
  );
}