none method
Returns true if the collection has no elements.
If test
is provided it returns true
if no elements pass the given
test
.
Implementation
bool none([bool Function(E element)? test]) {
for (final element in this) {
if (test == null) return false;
if (test.call(element)) return false;
}
return true;
}