setRowSelection method
Implementation
void setRowSelection(Offset pos1, Offset pos2) {
final y1 = min(pos1.dy, pos2.dy);
final y2 = max(pos1.dy, pos2.dy);
final row1 = binarySearch(rowOffsets, y1, 0, rowOffsets.length - 1);
final row2 = binarySearch(rowOffsets, y2, 0, rowOffsets.length - 1);
clear();
indexWithFocus = Index(-1, -1);
for (int i = row1; i <= row2; i++) {
addRowSelection(i);
}
}