copyWith method
Makes a copy of this Request, replacing original values with the given ones.
Implementation
Request copyWith({
String? method,
Uri? uri,
Uri? baseUri,
dynamic body,
Map<String, dynamic>? parameters,
Map<String, String>? headers,
bool? multipart,
List<PartValue>? parts,
ListFormat? listFormat,
@Deprecated('Use listFormat instead') bool? useBrackets,
bool? includeNullQueryVars,
Object? tag,
}) =>
Request(
method ?? this.method,
uri ?? this.uri,
baseUri ?? this.baseUri,
body: body ?? this.body,
parameters: parameters ?? this.parameters,
headers: headers ?? this.headers,
multipart: multipart ?? this.multipart,
parts: parts ?? this.parts,
listFormat: listFormat ?? this.listFormat,
// ignore: deprecated_member_use_from_same_package
useBrackets: useBrackets ?? this.useBrackets,
includeNullQueryVars: includeNullQueryVars ?? this.includeNullQueryVars,
tag: tag ?? this.tag,
);