updateCurrent method

void updateCurrent(
  1. T current(
    1. T value
    ), {
  2. bool doNotifyListeners = true,
})

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();
    }
  }
}