pickValues method
Returns a new map containing entries whose values are in the values list.
Example:
final map = {'a': 1, 'b': 2, 'c': 3};
final filtered = map.pickValues([2, 3]);
print(filtered); // Output: {'b': 2, 'c': 3}
Implementation
Map<K, V> pickValues(List<V> values) =>
Map<K, V>.fromEntries(entries.where((e) => values.contains(e.value)));