rowAtOffset method

int rowAtOffset(
  1. double dy
)

The row at a vertical offset in this section's local coordinates, or -1 when the offset falls outside the content.

Arithmetic when rows share a height, a binary search over a prefix-sum table when they do not — which is why callers go through it rather than dividing themselves.

Implementation

int rowAtOffset(double dy) => _rowMetrics.rowAtOffset(dy + _verticalOffset);