mapKeys<K2> method
Returns a new map with new keys and the same values.
Implementation
Map<K2, V1> mapKeys<K2>(K2 Function(K1 key) mapper) {
return Map.fromEntries(
entries.map(
(e) => MapEntry(
mapper(e.key),
e.value,
),
),
);
}