@@ -32,40 +32,39 @@ extension BaseResponseCopyWith on BaseResponse {
3232 int ? contentLength,
3333 // `IOStreamedResponse` only properties.
3434 HttpClientResponse ? inner,
35- }) =>
36- switch (this ) {
37- Response res => res.copyWith (
38- statusCode: statusCode,
39- body: body,
40- request: request,
41- headers: headers,
42- isRedirect: isRedirect,
43- persistentConnection: persistentConnection,
44- reasonPhrase: reasonPhrase,
45- ),
46- IOStreamedResponse res => res.copyWith (
47- stream: stream,
48- statusCode: statusCode,
49- contentLength: contentLength,
50- request: request,
51- headers: headers,
52- isRedirect: isRedirect,
53- persistentConnection: persistentConnection,
54- reasonPhrase: reasonPhrase,
55- inner: inner,
56- ),
57- StreamedResponse res => res.copyWith (
58- stream: stream,
59- statusCode: statusCode,
60- contentLength: contentLength,
61- request: request,
62- headers: headers,
63- isRedirect: isRedirect,
64- persistentConnection: persistentConnection,
65- reasonPhrase: reasonPhrase,
66- ),
67- _ => throw UnsupportedError (
68- 'Cannot copy unsupported type of response $runtimeType ' ,
69- ),
70- };
35+ }) => switch (this ) {
36+ Response res => res.copyWith (
37+ statusCode: statusCode,
38+ body: body,
39+ request: request,
40+ headers: headers,
41+ isRedirect: isRedirect,
42+ persistentConnection: persistentConnection,
43+ reasonPhrase: reasonPhrase,
44+ ),
45+ IOStreamedResponse res => res.copyWith (
46+ stream: stream,
47+ statusCode: statusCode,
48+ contentLength: contentLength,
49+ request: request,
50+ headers: headers,
51+ isRedirect: isRedirect,
52+ persistentConnection: persistentConnection,
53+ reasonPhrase: reasonPhrase,
54+ inner: inner,
55+ ),
56+ StreamedResponse res => res.copyWith (
57+ stream: stream,
58+ statusCode: statusCode,
59+ contentLength: contentLength,
60+ request: request,
61+ headers: headers,
62+ isRedirect: isRedirect,
63+ persistentConnection: persistentConnection,
64+ reasonPhrase: reasonPhrase,
65+ ),
66+ _ => throw UnsupportedError (
67+ 'Cannot copy unsupported type of response $runtimeType ' ,
68+ ),
69+ };
7170}
0 commit comments