filter method

Iterable<MapEntry<K, V>> filter(
  1. bool test(
    1. MapEntry<K, V>
    )
)

Returns a new Iterable<MapEntry<K,V>> with all elements that satisfy the predicate test.

Example:

{'a': 1, 'b': 2, 'c': 3}.filter((e) => e.key == 'a').toMap(); // {'a': 1}

Implementation

Iterable<MapEntry<K, V>> filter(bool Function(MapEntry<K, V>) test) {
  return entries.filter(test);
}