mutate method
void
mutate(
- dynamic updater(
- T value
Updates the value using the provided updater function.
If the updater returns null or true, listeners are notified.
Implementation
void mutate(Function(T value) updater) {
var result = updater(value);
if (result is T && result != value) {
value = result;
} else if (result == null || result == true) {
notifyListeners();
}
}