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