firstWhereOrNull method
Returns the first element that satisfies the given predicate test
or null if no element satisfies the predicate.
Implementation
E? firstWhereOrNull(bool Function(E element) test) {
for (var e in this) {
if (test(e)) {
return e;
}
}
return null;
}