scrollOffsetToIndex method

int scrollOffsetToIndex (double scrollOffset)

Returns the index of the child at the given offset.

Implementation

int scrollOffsetToIndex(double scrollOffset) => (scrollOffset / itemExtent).floor();