AppFlowySelectionService class abstract

AppFlowySelectionService is responsible for processing the Selection changes and updates.

Usually, this service can be obtained by the following code.

final selectionService = editorState.service.selectionService;

/** get current selection value*/
final selection = selectionService.currentSelection.value;

/** get current selected nodes*/
final nodes = selectionService.currentSelectedNodes;

Constructors

AppFlowySelectionService()

Properties

currentSelectedNodes List<Node>
The current selected Nodes in editor.
no setter
currentSelection ValueNotifier<Selection?>
The current Selection in editor.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectionRects List<Rect>
The current selection areas's rect in editor.
no setter

Methods

clearCursor() → void
Clears the cursor area.
clearSelection() → void
Clears the selection area, cursor area and the popup list area.
getNodeInOffset(Offset offset) Node?
Returns the Node containing to the offset.
getPositionInOffset(Offset offset) Position?
Returns the Position closest to the offset.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onPanEnd(DragEndDetails details, MobileSelectionDragMode mode) → void
onPanStart(DragStartDetails details, MobileSelectionDragMode mode) Selection?
The functions below are only for mobile.
onPanUpdate(DragUpdateDetails details, MobileSelectionDragMode mode) Selection?
registerGestureInterceptor(SelectionGestureInterceptor interceptor) → void
toString() String
A string representation of this object.
inherited
unregisterGestureInterceptor(String key) → void
updateSelection(Selection? selection) → void
Updates the selection.

Operators

operator ==(Object other) bool
The equality operator.
inherited