add method Null safety

void add(
  1. {required String key,
  2. required String value}
)

Add a new key-value pair to the store

Overwrites the value if the key already exists.

Prefer addAsync to avoid blocking the UI thread. Otherwise, this has slightly better performance.

Implementation

void add({
  required String key,
  required String value,
}) =>
    _db.writeTxnSync(
      () => _db.metadata.putSync(DbMetadata(name: key, data: value)),
    );