isIndexOutsideRange method

bool isIndexOutsideRange(
  1. int pressedRowIndex,
  2. int currentRecordIndex,
  3. int index
)

Check whether the index is outside the shift selected rows range.

Implementation

bool isIndexOutsideRange(
    int pressedRowIndex, int currentRecordIndex, int index) {
  if (pressedRowIndex < currentRecordIndex) {
    return index < pressedRowIndex || index > currentRecordIndex;
  } else {
    return index < currentRecordIndex || index > pressedRowIndex;
  }
}