mapKeys<K, V, K2> static method
Returns a new map with each key transformed by fn.
When fn produces duplicate keys, the last entry wins.
Obj.mapKeys({'firstName': 'Anna'}, (k) => k.toLowerCase());
// {'firstname': 'Anna'}
Implementation
static Map<K2, V> mapKeys<K, V, K2>(Map<K, V> map, K2 Function(K) fn) => {
for (final e in map.entries) fn(e.key): e.value,
};