updateAll method

IMap<K, V> updateAll(
  1. V update(
    1. K key,
    2. V value
    ), {
  2. bool ifRemove(
    1. K key,
    2. V value
    )?,
})

Updates all values.

Iterates over all entries in the map and updates them with the result of invoking update.

Implementation

IMap<K, V> updateAll(
  V Function(K key, V value) update, {
  bool Function(K key, V value)? ifRemove,
}) {
  Map<K, V> map = unlock..updateAll(update);
  if (ifRemove != null) map.removeWhere(ifRemove);
  return IMap._unsafeFromMap(map, config: config);
}