updateCurrent method

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

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

Implementation

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