filterByExcludedValues method
Filters the map's entries based on a list of excluded values.
Returns a new map excluding the key-value pairs where the value
is found within the excludedValues
.
Implementation
Map<K, V> filterByExcludedValues(List<V> excludedValues) {
return Map.fromEntries(
entries.where((e) => !excludedValues.contains(e.value)),
);
}