mapEntries<K2, V2> method
Maps the map to a new map with transformed keys and values.
Example:
{'a': 1, 'b': 2}.mapEntries((k, v) => MapEntry(k.toUpperCase(), v * 2));
// {'A': 2, 'B': 4}
Implementation
Map<K2, V2> mapEntries<K2, V2>(
MapEntry<K2, V2> Function(K key, V value) transform,
) {
return map((key, value) => transform(key, value));
}