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 list = entries.where((element) => test(element.key, element.value)).toList();
  return Map.fromEntries(list);
}