byteStreamToString function

Future<String> byteStreamToString (
  1. Stream<List<int>> stream,
  2. {Encoding encoding = utf8}
)

Converts a Stream of byte lists to a String.

Implementation

Future<String> byteStreamToString(Stream<List<int>> stream,
    {Encoding encoding = utf8}) {
  return stream.transform(encoding.decoder).join();
}