execute method
void
execute({
- required PlutoKeyManagerEvent keyEvent,
- required PlutoGridStateManager stateManager,
override
Implement actions to be mapped to shortcut keys.
Implementation
@override
void execute({
required PlutoKeyManagerEvent keyEvent,
required PlutoGridStateManager stateManager,
}) {
if (direction.horizontal) return;
final int moveCount =
(stateManager.rowContainerHeight / stateManager.rowTotalHeight).floor();
int rowIdx = stateManager.currentSelectingPosition?.rowIdx ??
stateManager.currentCellPosition?.rowIdx ??
0;
rowIdx += direction.isUp ? -moveCount : moveCount;
stateManager.moveSelectingCellByRowIdx(rowIdx, direction);
}