addAsync method

Future<void> addAsync({
  1. required String key,
  2. required String value,
})

Add a new key-value pair to the store asynchronously

Overwrites the value if the key already exists.

Implementation

Future<void> addAsync({
  required String key,
  required String value,
}) =>
    _db.writeTxn(
      () => _db.metadata.put(DbMetadata(name: key, data: value)),
    );