lastWhereIndexedOrNull method
The last element whose index and value satisfies test
.
Returns null
if no element and index satisfies test
.
Implementation
T? lastWhereIndexedOrNull(bool Function(int index, T element) test) {
T? result;
var index = 0;
for (var element in this) {
if (test(index++, element)) result = element;
}
return result;
}