removeLastWhere method
Remove the last count
items of a list thats satisfy the predicate
Implementation
List<T> removeLastWhere(bool Function(T) predicate, [int count = 1]) {
if (count > 0) {
int c = 0;
for (int i = length - 1; i >= 0; i--) {
if (predicate(this[i])) {
if (c >= count) break;
removeAt(i);
c++;
}
}
}
return this;
}