swapKeysWithValues method

Map<V, K> swapKeysWithValues()

Swaps the keys with values in the map. Note: If there are duplicate values, the last key-value pair will be kept.

Implementation

Map<V, K> swapKeysWithValues() => map((key, value) => MapEntry(value, key));