readBytes method Null safety
- int size
Read bytes into a Uint8List
.
This does the same as readChunk, except it uses collectBytes to create
a Uint8List
, which offers better performance.
Implementation
Future<Uint8List> readBytes(int size) async =>
await collectBytes(readStream(size));