readBytes method

Future<Uint8List> readBytes()

Reads the content of this subpart as a single Uint8List.

Implementation

Future<Uint8List> readBytes() async {
  final builder = BytesBuilder();
  await forEach(builder.add);
  return builder.takeBytes();
}