forEachIndexed method
Gives possibility to use index in forEach
function
Implementation
forEachIndexed(void Function(int index, T item) f) {
var i = 0;
forEach((e) => f(i++, e));
}
Gives possibility to use index in forEach
function
forEachIndexed(void Function(int index, T item) f) {
var i = 0;
forEach((e) => f(i++, e));
}