ByteStream.fromBytes(List<int> bytes)

Returns a single-subscription byte stream that will emit the given bytes in a single chunk.

Source

factory ByteStream.fromBytes(List<int> bytes) =>
    new ByteStream(new Stream<dynamic>.fromIterable(<List<int>>[bytes]));