exists method

Future<bool> exists()

Implementation

Future<bool> exists() async {
  final db = await _openDb();
  final txn = db.transaction(_objectStoreName, idbModeReadOnly);
  final store = txn.objectStore(_objectStoreName);
  final object = await store.getObject(_filePath);
  await txn.completed;
  return object != null;
}