StreamedHttpBody.fromByteStream constructor
StreamedHttpBody.fromByteStream(})
Construct the body to an HTTP request or an HTTP response from a stream
of chunks of bytes. The given byteStream
should be a single-
subscription stream.
Implementation
factory StreamedHttpBody.fromByteStream(
MediaType? contentType, Stream<List<int>> byteStream,
{int? contentLength, Encoding? fallbackEncoding}) {
final nonNullFallbackEncoding =
fallbackEncoding ?? utf8; // Use UTF-8 as the default fallback encoding.
return StreamedHttpBody._(
contentType, byteStream, contentLength, nonNullFallbackEncoding);
}