SelectionState class

Global selection state in the document

Constructors

SelectionState({SelectionPoint? anchor, SelectionPoint? focus})
const

Properties

anchor SelectionPoint?
final
focus SelectionPoint?
final
hashCode int
The hash code for this object.
no setterinherited
hasSelection bool
no setter
isCollapsed bool
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getSelectionRangeForNode(String nodeId, {Map<String, int>? positionIndex}) → ({String endFrag, int endOff, String startFrag, int startOff})?
For a given node, returns the selection limits in terms of fragment/offset Returns: (startFragmentId, startOffset, endFragmentId, endOffset) or null if not selected
isNodeSelected(String nodeId, {Map<String, int>? positionIndex}) bool
Returns true if a node is selected (partially or fully). positionIndex maps nodeId → document-order position (0..n-1). When provided it is used instead of the broken lexicographic UUID comparison.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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