indexToLayoutOffset method

  1. @protected
double indexToLayoutOffset (double itemExtent, int index)
@protected

The layout offset for the child with the given index.

This function is given the itemExtent as an argument to avoid recomputing itemExtent repeatedly during layout.

By default, places the children in order, without gaps, starting from layout offset zero.

Implementation

@protected
double indexToLayoutOffset(double itemExtent, int index) => itemExtent * index;