readAsBytes method
Implementation
Future<Uint8List> readAsBytes() async {
final db = await _openDb();
final txn = db.transaction(_objectStoreName, idbModeReadOnly);
final store = txn.objectStore(_objectStoreName);
final object = await store.getObject(_filePath) as Map?;
await txn.completed;
if (object == null) {
throw Exception('file not found: $_filePath');
}
return object['contents'] as Uint8List;
}