set method

  1. @override
Future<void> set(
  1. String key,
  2. Uint8List value
)
override

Stores the given value associated with the key.

If the key already exists, its value is overwritten.

Implementation

@override
Future<void> set(String key, Uint8List value) async {
  await _ensureDbOpen();

  final transaction = _db!.transaction('data', 'readwrite');
  final store = transaction.objectStore('data');
  await store.put(value, key);
  await transaction.completed;
}