updateKey method
V
updateKey(
- K key,
- V updater(
- V value
- V ifAbsent()?,
Update value for key (named updateKey to avoid shadowing Rx.update)
Implementation
V updateKey(K key, V Function(V value) updater, {V Function()? ifAbsent}) {
final newMap = Map<K, V>.from(value);
final result = newMap.update(key, updater, ifAbsent: ifAbsent);
value = newMap;
return result;
}