mapKeys<K2> method
Applies a transformation function to the keys of the Map.
Parameters
convert
: The transformation function to apply to the keys
Returns
- A new Map with transformed keys
Implementation
Map<K2, V> mapKeys<K2>(K2 Function(K key) convert) {
return map<K2, V>((key, value) => MapEntry(convert(key), value));
}