mapValues<T> method

Map<K, T> mapValues<T>(
  1. T transform(
    1. V value
    )
)

Transforms the values of a map.

Implementation

Map<K, T> mapValues<T>(T Function(V value) transform) {
  final result = <K, T>{};
  forEach((key, value) {
    result[key] = transform(value);
  });
  return result;
}