update method

V update(
  1. K key,
  2. V update(
    1. V value
    ), {
  3. V ifAbsent()?,
})

Implementation

V update(K key, V Function(V value) update, {V Function()? ifAbsent}) {
  final modifiedValue = value;
  final element = modifiedValue.update(key, update, ifAbsent: ifAbsent);
  value = modifiedValue;
  return element;
}