mapValues<V2> method
Returns a new map with values transformed by the mapper function.
Example:
{'a': 1, 'b': 2}.mapValues((v) => v * 2);
// {'a': 2, 'b': 4}
Implementation
Map<K, V2> mapValues<V2>(V2 Function(V) mapper) {
return map((key, value) => MapEntry(key, mapper(value)));
}