updateIf method
Updates the ValueNotifier
's value to newValue
if condition
returns true.
Implementation
void updateIf(bool Function(T) condition, T newValue) {
if (condition(_value)) {
value = newValue;
}
}
Updates the ValueNotifier
's value to newValue
if condition
returns true.
void updateIf(bool Function(T) condition, T newValue) {
if (condition(_value)) {
value = newValue;
}
}