updateSelection method
SelectionT?
updateSelection({ - required SelectionT? currentSelection,
- required PositionT? position,
- required SelectionT extendSelection(
- SelectionT currentSelection,
- PositionT position
),
- required SelectionT? extendLineSelection(
- int anchorRow,
- PositionT position
),
})
Implementation
SelectionT? updateSelection({
required SelectionT? currentSelection,
required PositionT? position,
required SelectionT Function(
SelectionT currentSelection,
PositionT position,
)
extendSelection,
required SelectionT? Function(int anchorRow, PositionT position)
extendLineSelection,
}) {
if (currentSelection == null || position == null) {
return null;
}
final anchorRow = session.lineSelectionAnchorRow;
return anchorRow == null
? extendSelection(currentSelection, position)
: extendLineSelection(anchorRow, position);
}