replace method
Create a new StreamedResponse using all the values from this instance except for the parameters specified.
Implementation
StreamedResponse replace(
{Stream<List<int>>? byteStream,
int? status,
String? statusText,
Map<String, String>? headers}) {
status = status ?? this.status;
statusText = statusText ?? this.statusText;
headers = headers ?? this.headers;
if (byteStream == null) {
return StreamedResponse._(status, statusText, headers, _body);
} else {
return StreamedResponse.fromByteStream(
status, statusText, headers, byteStream);
}
}