moveSelectingCellToEdgeOfColumns method
void
moveSelectingCellToEdgeOfColumns(
- PlutoMoveDirection direction, {
- bool force = false,
- bool notify = true,
inherited
Implementation
@override
void moveSelectingCellToEdgeOfColumns(
PlutoMoveDirection direction, {
bool force = false,
bool notify = true,
}) {
if (!direction.horizontal) {
return;
}
if (!force && isEditing == true) {
return;
}
if (currentCell == null) {
return;
}
final int columnIdx = direction.isLeft ? 0 : refColumns.length - 1;
final int? rowIdx = hasCurrentSelectingPosition
? currentSelectingPosition!.rowIdx
: currentCellPosition!.rowIdx;
setCurrentSelectingPosition(
cellPosition: PlutoGridCellPosition(
columnIdx: columnIdx,
rowIdx: rowIdx,
),
notify: notify,
);
direction.isLeft
? scroll.horizontal!.jumpTo(0)
: scroll.horizontal!.jumpTo(scroll.maxScrollHorizontal);
}