forEach method Null safety

void forEach(
  1. dynamic action(
    1. K key,
    2. V value
    )
)

Performs given action on each key/value pair from this map.

action must not be null.

Implementation

void forEach(Function(K key, V value) action) {
  entries.forEach((entry) => action(entry.key, entry.value));
}