copyWith method

RouteMatch 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,
})

Returns a new instance of RouteMatch with the overridden values

Implementation

RouteMatch 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 RouteMatch._internal(
    config: config ?? _config,
    stringMatch: stringMatch ?? this.stringMatch,
    segments: segments ?? this.segments,
    children: children ?? this.children,
    params: pathParams ?? params,
    queryParams: queryParams ?? this.queryParams,
    fragment: fragment ?? this.fragment,
    args: args ?? this.args,
    key: key ?? this.key,
    redirectedFrom: redirectedFrom ?? this.redirectedFrom,
    autoFilled: autoFilled ?? this.autoFilled,
    id: id,
    evaluatedGuards: evaluatedGuards ?? _evaluatedGuards,
  );
}