swapKeysWithValues method
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));
Swaps the keys with values in the map. Note: If there are duplicate values, the last key-value pair will be kept.
Map<V, K> swapKeysWithValues() => map((key, value) => MapEntry(value, key));