map<K2, V2> method

Map<K2, V2> map<K2, V2>(
  1. MapEntry<K2, V2> converter(
    1. K k,
    2. V v
    )
)

Transforms the map by applying a function to all its key-value pairs.

  • converter: A function that takes a key-value pair and returns a new MapEntry.
  • Returns: A new map with transformed keys and values.

Implementation

Map<K2, V2> map<K2, V2>(MapEntry<K2, V2> Function(K k, V v) converter) =>
    value.map<K2, V2>(converter);