where method

Map<K, V> where(
  1. bool test(
    1. K key,
    2. V value
    )
)

Implementation

Map<K, V> where(bool Function(K key, V value) test) {
  final Map<K, V> matches = {};
  entries.forEach((entry) {
    if (test(entry.key, entry.value)) matches[entry.key] = entry.value;
  });
  return matches;
}