update method
void
update(
- void updateFn(
- T value
Mutates the current value in place and always notifies listeners.
Use this for values that are modified rather than replaced, where the
== check in value would swallow the change:
state.filters.update((f) => f.add('unread'));
Implementation
void update(void Function(T value) updateFn) {
updateFn(_value);
notifyListeners();
}