CreamyTextSelectionControlsProvider class
A TextSelectionControls provider with actions.
Provide additional options to the text selection toolbar.
This delegates methods from controls to allow compatiblity with Material Text input fields.
- Implemented types
Constructors
- CreamyTextSelectionControlsProvider({required TextSelectionControlsType type, required ActionsBuilderCallback actionsBuilder})
-
Provide text selection controls from this package,
factory
- CreamyTextSelectionControlsProvider.custom({required CreamyTextSelectionControls controls, required ActionsBuilderCallback actionsBuilder})
- A Provider of a custom CreamyTextSelectionControls with actions.
Properties
- actionsBuilder ↔ ActionsBuilderCallback
-
More actions the selection toolbar should offer.
getter/setter pair
- controls → CreamyTextSelectionControls
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
buildHandle(
BuildContext context, TextSelectionHandleType type, double textLineHeight, [VoidCallback? onTap, double? startGlyphHeight, double? endGlyphHeight]) → Widget -
Builds a selection handle of the given
type
.override -
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.
override
-
canCopy(
TextSelectionDelegate delegate) → bool -
Whether the current selection of the text field managed by the given
delegate
can be copied to the Clipboard.override -
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.override -
canPaste(
TextSelectionDelegate delegate) → bool -
Whether the text field managed by the given
delegate
supports pasting from the clipboard.override -
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.override -
getHandleAnchor(
TextSelectionHandleType type, double textLineHeight, [double? startGlyphHeight, double? endGlyphHeight]) → 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.
override
-
getHandleSize(
double textLineHeight) → Size -
Returns the size of the selection handle.
override
-
handleCopy(
TextSelectionDelegate delegate, ClipboardStatusNotifier? clipboardStatus) → void -
Call TextSelectionDelegate.copySelection to copy current selection.
override
-
handleCut(
TextSelectionDelegate delegate, ClipboardStatusNotifier? clipboardStatus) → void -
Call TextSelectionDelegate.cutSelection to cut current selection.
override
-
handlePaste(
TextSelectionDelegate delegate) → Future< void> -
Call TextSelectionDelegate.pasteText to paste text.
override
-
handleSelectAll(
TextSelectionDelegate delegate) → void -
Call TextSelectionDelegate.selectAll to set the current selection to
contain the entire text value.
override
-
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