forEachIndexed method

void forEachIndexed(
  1. void f(
    1. E e,
    2. int i
    )
)

Calls f for each element in the iterable.

Implementation

void forEachIndexed(void Function(E e, int i) f) {
  var i = 0;
  for (var e in this) {
    f(e, i++);
  }
}