updateCurrent method

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

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

Implementation

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