updateCurrent method

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

Provides current list and updates the list of the informer with received list.

Implementation

void updateCurrent(
  List<T> Function(List<T> current) current, {
  bool doNotifyListeners = true,
}) {
  final newValue = current(List.from(_value));
  if (_forceUpdate || listEquals(_value, newValue)) {
    _value = newValue;
    _checkAndRemoveLowerDifference();
    if (doNotifyListeners) {
      notifyListeners();
    }
  }
}