lastOrNull method
Returns the last element that satisfies the given predicate test
or null if no element satisfies the predicate.
Implementation
E? lastOrNull(bool test(E element)) {
for (var i = length - 1; i >= 0; i--) {
if (test(elementAt(i))) {
return elementAt(i);
}
}
return null;
}