getBlobData static method

Future<Uint8List?> getBlobData(
  1. Blob blob
)

Implementation

static Future<Uint8List?> getBlobData(html.Blob blob) async {
  final completer = Completer<Uint8List?>();
  final reader = html.FileReader();
  reader.readAsArrayBuffer(blob);
  reader.onLoad
      .listen((_) => completer.complete(reader.result as Uint8List?));
  return completer.future;
}