forEachIndexed method
- void action(
- int index,
- T element
Takes an action for each element.
Calls action
for each element along with the index in the
iteration order.
Implementation
void forEachIndexed(void Function(int index, T element) action) {
var index = 0;
for (var element in this) {
action(index++, element);
}
}