where method

Map<K, V> where(
  1. bool test(
    1. MapEntry<K, V> entry
    )
)

Returns a new Map containing all key-value pairs passing the given test.

Implementation

Map<K, V> where(bool Function(MapEntry<K, V> entry) test) =>
    Map.fromEntries(entries.where((entry) => test(entry)));