where1 method
Returns the first element that matches test,
or null if none match.
Implementation
T? where1(bool Function(T e) test) {
for (final e in this) {
if (test(e)) return e;
}
return null;
}
Returns the first element that matches test,
or null if none match.
T? where1(bool Function(T e) test) {
for (final e in this) {
if (test(e)) return e;
}
return null;
}