computeIfPresent method

V computeIfPresent(
  1. K key,
  2. V ifPresent(
    1. K key,
    2. V value
    )
)

Implementation

V computeIfPresent(K key, V Function(K key, V value) ifPresent) {
  if (containsKey(key)) {
    this[key] = ifPresent(key, this[key]!);
  }
  return this[key]!;
}