mapIndexed<T> method Null safety

Iterable<T> mapIndexed<T>(
  1. IndexedTransform<E, T> f
)

Transforms each element to another object of type T, by applying the transformer f, providing sequential index of the element.

Implementation

Iterable<T> mapIndexed<T>(IndexedTransform<E, T> f) {
  final self = this;
  return self != null ? _IndexedMappedIterable(self, f) : Iterable.empty();
}