mapKeys<R> method

Map<R, V> mapKeys<R>(
  1. R transform(
    1. MapEntry<K, V> entry
    )
)

Returns a new Map with entries having the keys obtained by applying the transform function to each entry in this Map and the values of this Map.

Implementation

Map<R, V> mapKeys<R>(R Function(MapEntry<K, V> entry) transform) =>
    Map.fromIterables(entries.map(transform), values);