getKeys method

Preference<Set<String>> getKeys()

Emits all the keys that currently exist - which means keys that have a non-null value.

Whenever there's a value associated for a new key, emits all the existing keys along the newly added key. If a value for a specific key gets removed (or set to null), emits a set of current keys without the recently removed key.

If there are no keys, emits an empty Set.

Implementation

Preference<Set<String>> getKeys() {
  return _getValue(
    // ignore: invalid_use_of_internal_member
    Preference.$$_getKeysKey,
    defaultValue: Set(),
    adapter: _GetKeysAdapter.instance,
  );
}