filterKeys<K, V> method
Filter where the key is in the given keys
.
Returns a new map with filtered entries.
Implementation
Map<K, V> filterKeys<K, V>(Iterable<K> keys) {
final map = <K, V>{};
for (final key in keys) {
if (containsKey(key)) {
map[key] = this[key] as V;
}
}
return map;
}