lastWhereOrNull method
Returns the last element passing the given test
, or null
if no such
element was found.
Implementation
E? lastWhereOrNull(bool Function(E element) test) {
E? element;
for (final elm in this) {
if (test(elm)) element = elm;
}
return element;
}