whereIndexedTo method
Appends all elements matching the given predicate
to the given
destination
.
Implementation
void whereIndexedTo(
List<E> destination, bool Function(E element, int index) predicate) {
var index = 0;
for (var element in this) {
if (predicate(element, index++)) {
destination.add(element);
}
}
}