SelectionManager class

Manages the global selection in the document

Inheritance

Constructors

SelectionManager()

Properties

hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
hasSelection bool
no setter
isCollapsed bool
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state SelectionState
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
batchUpdate(void fn()) → void
Executes fn with notifications suppressed, then notifies once.
clear() → void
Clears the selection
collapse() → void
Collapses the selection (removes the highlight)
dispose() → void
Discards any resources used by the object.
inherited
getRangeForNode(String nodeId) → ({String endFrag, int endOff, String startFrag, int startOff})?
Returns the selection range for a given node. Uses an internal cache so repeated lookups during a single sync pass (e.g. one per visible paragraph) are O(1) instead of O(visible).
isNodeSelected(String nodeId) bool
True if the node is selected (partially or fully)
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
setPositionIndex(Map<String, int> index) → void
startSelection(String nodeId, String fragmentId, int offset) → void
Starts a selection (tap or start of drag)
toString() String
A string representation of this object.
inherited
updateFocus(String nodeId, String fragmentId, int offset) → void
Updates the focus during drag

Operators

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