lastWhereOrNull method Null safety
- bool test(
- T element
The last element satisfying test
, or null
if there are none.
Implementation
T? lastWhereOrNull(bool Function(T element) test) {
T? result;
for (var element in this) {
if (test(element)) result = element;
}
return result;
}