TextSelectionOverlay class

An object that manages a pair of text selection handles.

The selection handles are displayed in the Overlay that most closely encloses the given BuildContext.

Constructors

TextSelectionOverlay({@required TextEditingValue value, @required BuildContext context, Widget debugRequiredFor, @required LayerLink toolbarLayerLink, @required LayerLink startHandleLayerLink, @required LayerLink endHandleLayerLink, @required RenderEditable renderObject, TextSelectionControls selectionControls, bool handlesVisible: false, TextSelectionDelegate selectionDelegate, DragStartBehavior dragStartBehavior: DragStartBehavior.start, VoidCallback onSelectionHandleTapped })
Creates an object that manages overly entries for selection handles. [...]

Properties

context BuildContext
The context in which the selection handles should appear. [...]
final
debugRequiredFor Widget
Debugging information for explaining why the Overlay is required.
final
dragStartBehavior DragStartBehavior
Determines the way that drag start behavior is handled. [...]
final
The objects supplied to the CompositedTransformTarget that wraps the location of end selection handle.
final
handlesAreVisible bool
Whether the handles are currently visible.
read-only
handlesVisible bool
Whether selection handles are visible. [...]
read / write
onSelectionHandleTapped VoidCallback
A callback that's invoked when a selection handle is tapped. [...]
final
renderObject RenderEditable
The editable line in which the selected text is being displayed.
final
selectionControls TextSelectionControls
Builds text selection handles and toolbar.
final
selectionDelegate TextSelectionDelegate
The delegate for manipulating the current selection in the owning text field.
final
The objects supplied to the CompositedTransformTarget that wraps the location of start selection handle.
final
toolbarIsVisible bool
Whether the toolbar is currently visible.
read-only
The object supplied to the CompositedTransformTarget that wraps the text field.
final
value TextEditingValue
Retrieve current value.
@visibleForTesting, read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

dispose() → void
Final cleanup.
hide() → void
Hides the entire overlay including the toolbar and the handles.
hideHandles() → void
Destroys the handles by removing them from overlay.
hideToolbar() → void
Hides the toolbar part of the overlay. [...]
showHandles() → void
Builds the handles by inserting them into the context's overlay.
showToolbar() → void
Shows the toolbar by inserting it into the context's overlay.
update(TextEditingValue newValue) → void
Updates the overlay after the selection has changed. [...]
updateForScroll() → void
Causes the overlay to update its rendering. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited

Constants

fadeDuration → const Duration
Controls the fade-in and fade-out animations for the toolbar and handles.
const Duration(milliseconds: 150)