TextSelectionControls class

An interface for building the selection UI, to be provided by the implementor of the toolbar widget.

Override text operations such as handleCut if needed.

Constructors

TextSelectionControls()

Properties

handleSize Size
Returns the size of the selection handle.
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

buildHandle(BuildContext context, TextSelectionHandleType type, double textLineHeight) Widget
Builds a selection handle of the given type. [...]
buildToolbar(BuildContext context, Rect globalEditableRegion, Offset position, TextSelectionDelegate delegate) Widget
Builds a toolbar near a text selection. [...]
canCopy(TextSelectionDelegate delegate) bool
Whether the current selection of the text field managed by the given delegate can be copied to the Clipboard. [...]
canCut(TextSelectionDelegate delegate) bool
Whether the current selection of the text field managed by the given delegate can be removed from the text field and placed into the Clipboard. [...]
canPaste(TextSelectionDelegate delegate) bool
Whether the current Clipboard content can be pasted into the text field managed by the given delegate. [...]
canSelectAll(TextSelectionDelegate delegate) bool
Whether the current selection of the text field managed by the given delegate can be extended to include the entire content of the text field. [...]
handleCopy(TextSelectionDelegate delegate) → void
Copy the current selection of the text field managed by the given delegate to the Clipboard. Then, move the cursor to the end of the text (collapsing the selection in the process), and hide the toolbar. [...]
handleCut(TextSelectionDelegate delegate) → void
Copy the current selection of the text field managed by the given delegate to the Clipboard. Then, remove the selected text from the text field and hide the toolbar. [...]
handlePaste(TextSelectionDelegate delegate) Future<void>
Paste the current clipboard selection (obtained from Clipboard) into the text field managed by the given delegate, replacing its current selection, if any. Then, hide the toolbar. [...]
handleSelectAll(TextSelectionDelegate delegate) → void
Adjust the selection of the text field managed by the given delegate so that everything is selected. [...]
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