copyWith method
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,
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,
);
}