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