updateCurrent method
Provides current value and updates it with received value.
Implementation
void updateCurrent(
T Function(T value) current, {
bool doNotifyListeners = true,
}) {
final newValue = current(_value);
if (_forceUpdate || _value != newValue) {
_value = newValue;
if (doNotifyListeners) {
notifyListeners();
}
}
}