copyWith method
Implementation
Response<T> copyWith({
Request? request,
int? statusCode,
Stream<List<int>>? bodyBytes,
String? bodyString,
String? statusText,
Map<String, String>? headers,
T? body,
}) {
return Response<T>(
request: request ?? this.request,
statusCode: statusCode ?? this.statusCode,
bodyBytes: bodyBytes ?? this.bodyBytes,
bodyString: bodyString ?? this.bodyString,
statusText: statusText ?? this.statusText,
headers: headers ?? this.headers,
body: body ?? this.body,
);
}