copyWith<NewBodyType> method
GoogleHTTPResponse<NewBodyType>
copyWith<NewBodyType>({
- BaseResponse? base,
- NewBodyType? body,
- GoogleErrorResponse? error,
Makes a copy of this Response, replacing original values with the given ones. This method can also alter the type of the response body.
Implementation
GoogleHTTPResponse<NewBodyType> copyWith<NewBodyType>({
http.BaseResponse? base,
NewBodyType? body,
GoogleErrorResponse? error,
}) =>
GoogleHTTPResponse<NewBodyType>(
base ?? this.base,
body ?? (this.body as NewBodyType),
error: error ?? this.error,
);