bytes property
Lazily reads all bytes from the multipart stream.
Implementation
Future<Uint8List> get bytes async {
if (_bytes != null) return _bytes!;
final builder = BytesBuilder();
await for (final chunk in stream) {
builder.add(chunk);
}
_bytes = builder.takeBytes();
return _bytes!;
}