forEachIndex method

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

Like Iterable

Implementation

// ignore: public_member_api_docs
void forEachIndex(void f(E e, int i)) {
  var i = 0;
  this.forEach((e) => f(e, i++));
}