update method
void
update(
- T reducer(
- T state
Updates the state by applying a reducer function to the current value.
// Example usage:
state.update((s) => s.copyWith(count: s.count + 1));
Implementation
void update(T Function(T state) reducer) {
_setValueInternal(reducer(value));
}