flatMapIndexed<R> method
Returns a single list of all elements yielded from results of transform
function being invoked on each element and its index in the original
collection.
Implementation
KtList<R> flatMapIndexed<R>(KtIterable<R> Function(int index, T) transform) {
final list = flatMapIndexedTo(mutableListOf<R>(), transform);
// making a temp variable here, it helps dart to get types right ¯\_(ツ)_/¯
// TODO ping dort-lang/sdk team to check that bug
return list;
}