forEachIndexed method
Iterates through elements with their respective indices.
Implementation
void forEachIndexed(void Function(int index, T element) action) {
var index = 0;
for (final element in this) {
action(index++, element);
}
}
Iterates through elements with their respective indices.
void forEachIndexed(void Function(int index, T element) action) {
var index = 0;
for (final element in this) {
action(index++, element);
}
}