onSetValue abstract method

Future<void> onSetValue(
  1. String k,
  2. T value
)

Abstract method to be implemented by subclasses for asynchronously setting the value for a key.

Accepts the key and new value, returning a Future<void> upon completion. Invoked by setValue; responsible for persistence, such as updating maps or external stores. Ensures changes are reflected in the subject for reactivity.

Implementation

Future<void> onSetValue(String k, T value);