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