computeIfPresent method
V
computeIfPresent(
- K key,
- V ifPresent(
- K key,
- 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]!;
}