all method

bool all(
  1. bool test(
    1. T element
    )
)

Checks if all elements satisfy a given condition

Implementation

bool all(bool Function(T element) test) {
  for (var element in this) {
    if (!test(element)) return false;
  }
  return true;
}