mapKeys<K2> method
Transforms the keys of the map.
Example:
print({'a': 1}.mapKeys((k, v) => k.toUpperCase())); // {'A': 1}
Implementation
Map<K2, V> mapKeys<K2>(K2 Function(K key, V value) transform) {
return Map.fromEntries(entries.map((e) => MapEntry(transform(e.key, e.value), e.value)));
}