find method
Returns the first element matching predicate, or null
if element was not found.
Implementation
E? find(Predicate<E> predicate) {
for (final element in this) {
if (predicate(element)) {
return element;
}
}
return null;
}