findLastIndex function
- @Deprecated("Use inbuilt List.lastIndexOf() or List.lastIndexWhere() instead")
- List list,
- dynamic predicate, {
- dynamic fromIndex,
Implementation
@Deprecated("Use inbuilt List.lastIndexOf() or List.lastIndexWhere() instead")
int findLastIndex(List list, dynamic predicate, {dynamic fromIndex}) {
fromIndex ??= list.length - 1;
for (int i = fromIndex; i >= 0; i--) {
if (evaluatePredicate(predicate, list[i])) return i;
}
return -1;
}