forEachIndexed method

*<Null safety>*

void forEachIndexed (void action(int index, T element))

Implementation

void forEachIndexed(void Function(int index, T element) action) {
  var index = 0;
  for (var element in this) {
    action(index++, element);
  }
}