all method

bool all(
  1. bool test(
    1. K,
    2. V
    )
)

Returns true if all entries match the predicate.

Example:

{'a': 1, 'b': 2}.all((k, v) => v > 0); // true

Implementation

bool all(bool Function(K, V) test) {
  for (final entry in entries) {
    if (!test(entry.key, entry.value)) return false;
  }
  return true;
}