download method

Future<Uint8List> download(
  1. String path
)

Buffers the complete file. Use downloadStream for large files.

Implementation

Future<Uint8List> download(String path) async {
  final data = BytesBuilder(copy: false);
  await for (final chunk in downloadStream(path)) {
    data.add(chunk);
  }
  return data.takeBytes();
}