mapIndexed<E> method

ValueCell<Iterable<E>> mapIndexed<E>(
  1. E convert(
    1. int i,
    2. T e
    )
)

Returns a cell which evaluates to Iterable.mapIndexed applied on the value in this cell.

The convert function is called with the index and element of each item in the list. The returned cell is recomputed whenever the value of this cell changes.

Implementation

ValueCell<Iterable<E>> mapIndexed<E>(E Function(int i, T e) convert) =>
    apply((value) => value.mapIndexed(convert),
      key: _IterablePropKey(this, (#mapIndexed, convert))
    ).store();