firstWhereOrNull method
Find first item in this list fulfilling predicate
. Will not evaluate on the remaining
items after the first match is found.
Implementation
E? firstWhereOrNull(bool Function(E) predicate) {
for (final it in this) {
if (predicate(it)) return it;
}
return null;
}