none method

bool none(
  1. bool test(
    1. K key,
    2. V value
    )
)

Returns true if no entry satisfies test, or this Map is empty.

Implementation

bool none(bool Function(K key, V value) test) {
  if (isEmpty) return true;

  for (final MapEntry(:key, :value) in entries) {
    if (test(key, value)) return false;
  }

  return true;
}