update method
void
update(
- T updater(
- T current
Updates the value using a function and notifies listeners if changed.
Implementation
void update(T Function(T current) updater) {
value = updater(_value);
}