set method
Replaces key with value.
Implementation
void set(String key, Object? value) {
_ensureActive();
final normalizedKey = validateStateKey(key);
final normalizedValue = _normalizeStateValue(value);
if (_batchDepth > 0) {
_writeStatePath(_values, normalizedKey, normalizedValue);
_pendingChangedPaths.add(normalizedKey);
return;
}
_applySingleStoreChange(this, normalizedKey, () {
_writeStatePath(_values, normalizedKey, normalizedValue);
});
}