persist method

Future<void> persist(
  1. String key,
  2. dynamic value
)

Implementation

Future<void> persist(String key, dynamic value) async {
  assert(_box != null, 'the store is not connected');

  final update = _box!.containsKey(key);
  await _box!.put(key, value);

  _notifyChangesListeners(
    update ? TStoreChangeType.update : TStoreChangeType.add,
    key: key,
    value: value,
  );
}