setCurrentCell method
Change the selected cell.
Implementation
@override
void setCurrentCell(
PlutoCell? cell,
int? rowIdx, {
bool notify = true,
}) {
if (cell == null ||
rowIdx == null ||
refRows.isEmpty ||
rowIdx < 0 ||
rowIdx > refRows.length - 1) {
return;
}
if (currentCell != null && currentCell!.key == cell.key) {
return;
}
_state._currentCell = cell;
_state._currentCellPosition = PlutoGridCellPosition(
rowIdx: rowIdx,
columnIdx: columnIdxByCellKeyAndRowIdx(cell.key, rowIdx),
);
clearCurrentSelecting(notify: false);
setEditing(autoEditing, notify: false);
notifyListeners(notify, setCurrentCell.hashCode);
}