TextSelectionControls class Null safety
An interface for building the selection UI, to be provided by the implementer of the toolbar widget.
Override text operations such as handleCut if needed.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
Methods
-
buildHandle(
BuildContext context, TextSelectionHandleType type, double textLineHeight, [VoidCallback? onTap]) → Widget -
Builds a selection handle of the given
type
. -
buildToolbar(
BuildContext context, Rect globalEditableRegion, double textLineHeight, Offset position, List< TextSelectionPoint> endpoints, TextSelectionDelegate delegate, ClipboardStatusNotifier? clipboardStatus, Offset? lastSecondaryTapDownPosition) → 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 text field managed by the given
delegate
supports pasting from the clipboard. -
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. -
getHandleAnchor(
TextSelectionHandleType type, double textLineHeight) → Offset - Get the anchor point of the handle relative to itself. The anchor point is the point that is aligned with a specific point in the text. A handle often visually "points to" that location.
-
getHandleSize(
double textLineHeight) → Size - Returns the size of the selection handle.
-
handleCopy(
TextSelectionDelegate delegate, [ClipboardStatusNotifier? clipboardStatus]) → void - Call TextSelectionDelegate.copySelection to copy current selection.
-
handleCut(
TextSelectionDelegate delegate, [ClipboardStatusNotifier? clipboardStatus]) → void - Call TextSelectionDelegate.cutSelection to cut current selection.
-
handlePaste(
TextSelectionDelegate delegate) → Future< void> - Call TextSelectionDelegate.pasteText to paste text.
-
handleSelectAll(
TextSelectionDelegate delegate) → void - Call TextSelectionDelegate.selectAll to set the current selection to contain the entire text value.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited