stickyRowAtOffset method

int stickyRowAtOffset(
  1. double dy
)

The pinned header row under a local vertical offset, or -1.

Implementation

int stickyRowAtOffset(double dy) {
  for (final (row, top, height) in _stickySlots.reversed) {
    if (dy >= top && dy < top + height) return row;
  }
  return -1;
}