readAsBytes method

Future<Uint8List> readAsBytes()

Transform the entire FormData contents as a list of bytes asynchronously.

Implementation

Future<Uint8List> readAsBytes() {
  return Future.sync(
    () => finalize().reduce((a, b) => Uint8List.fromList([...a, ...b])),
  );
}