setCurrentSelectingPosition method

  1. @override
void setCurrentSelectingPosition({
  1. PlutoGridCellPosition? cellPosition,
  2. bool notify = true,
})
inherited

Sets the position of a multi-selected cell.

Implementation

@override
void setCurrentSelectingPosition({
  PlutoGridCellPosition? cellPosition,
  bool notify = true,
}) {
  if (selectingMode.isNone) {
    return;
  }

  if (currentSelectingPosition == cellPosition) {
    return;
  }

  _state._currentSelectingPosition =
      isInvalidCellPosition(cellPosition) ? null : cellPosition;

  if (currentSelectingPosition != null && selectingMode.isRow) {
    setCurrentSelectingRowsByRange(
      currentRowIdx,
      currentSelectingPosition!.rowIdx,
      notify: false,
    );
  }

  notifyListeners(notify, setCurrentSelectingPosition.hashCode);
}