updateKey method

void updateKey(
  1. E key,
  2. T update(
    1. T value
    ), {
  3. T ifAbsent()?,
  4. bool doNotifyListeners = true,
})

Updates the value for the provided key nu calling the Map.update method.

Implementation

void updateKey(
  E key,
  T Function(T value) update, {
  T Function()? ifAbsent,
  bool doNotifyListeners = true,
}) {
  _value = _value..update(key, update, ifAbsent: ifAbsent);
  if (doNotifyListeners) {
    notifyListeners();
  }
}