filterByIncludedValues method

Map<K, V> filterByIncludedValues(
  1. List<V> includedValues
)

Filters the map's entries based on a list of included values. Returns a new map containing only the key-value pairs where the value is found within the includedValues.

Implementation

Map<K, V> filterByIncludedValues(List<V> includedValues) {
  return Map.fromEntries(
    entries.where((e) => includedValues.contains(e.value)),
  );
}