mapIndexed<S> method

List<S> mapIndexed<S>(
  1. S func(
    1. int,
    2. T
    )
)

Implementation

List<S> mapIndexed<S>(S Function(int, T) func) => toList()
    .asMap()
    .map((index, value) => MapEntry(index, func(index, value)))
    .values
    .toList();