set method

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

Implementation

@override
Future<void> set(String key, T value) async {
  checkInitialized();

  if (data.containsKey(key)) {
    onUpdate.broadcast(
      StoreUpdateEvent(
        key,
        value,
      ),
    );
  } else {
    onCreate.broadcast(
      StoreCreateEvent(
        key,
        value,
      ),
    );
  }

  data[key] = value;

  await persist();
}