mapValues<K, V, R> method

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

Implementation

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