SmoothSelectionController class
Controller for programmatic text selection in a SmoothSelectionRegion.
This is the preferred API for callers that need to drive selection from outside the markdown widget. It keeps widget state and GlobalKey usage out of application code while preserving the same capabilities exposed by SmoothSelectionRegionState.
Constructors
Properties
- contextMenuAnchors → TextSelectionToolbarAnchors
-
The anchors used to position the text selection toolbar.
no setter
-
contextMenuButtonItems
→ List<
ContextMenuButtonItem> -
The platform-default context menu button items for the current selection.
no setter
- currentState → SmoothSelectionRegionState?
-
The attached region state, if any.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAttached → bool
-
Whether this controller is currently attached to a mounted
SmoothSelectionRegion.
no setter
- registrar → SelectionRegistrar?
-
The SelectionRegistrar captured from the attached region.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clearSelection(
) → void - Clears the current selection.
-
dispatchEvent(
SelectionEvent event) → SelectionResult? -
Dispatches an arbitrary SelectionEvent to the attached region's
contained
SelectionContainer. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
selectAll(
[SelectionChangedCause cause = SelectionChangedCause.toolbar]) → void -
Selects all content in the attached region, showing handles and toolbar
when
causeis SelectionChangedCause.toolbar. -
selectParagraphAt(
Offset globalPosition) → void -
Selects the paragraph at
globalPosition. -
selectWordAt(
Offset globalPosition) → void -
Selects the word at
globalPosition. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited