where method
Returns a new Map by filtering its entries using the given predicate.
Implementation
Map<K, V> where(KeyValuePredicate<K, V> p) {
Map<K, V> map = {};
forEach((k, v) {
if (p(k, v)) map[k] = v;
});
return map;
}
Returns a new Map by filtering its entries using the given predicate.
Map<K, V> where(KeyValuePredicate<K, V> p) {
Map<K, V> map = {};
forEach((k, v) {
if (p(k, v)) map[k] = v;
});
return map;
}