scrollOffsetToIndex method

int scrollOffsetToIndex(
  1. double scrollOffset
)

Returns the index of the child at the given offset.

Implementation

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