whereValue method

Map<K, V> whereValue(
  1. bool test(
    1. V v
    )
)

Returns a new map containing only the entries where the value satisfies the test predicate.

Example:

final filtered = map.whereValue((v) => v > 10);

Implementation

Map<K, V> whereValue(bool Function(V v) test) =>
    Map.fromEntries(entries.where((e) => test(e.value)));