IOSTextFieldTouchInteractor class
iOS text field touch interaction surface.
This widget is intended to be displayed in the foreground of a SuperText
widget.
This widget recognizes and acts upon various user interactions:
- Tap: Place a collapsed text selection at the text location that's nearest to the tap offset.
- Tap (in a location that doesn't move the caret): Toggle the toolbar.
- Double-Tap: Select the word surrounding the tapped location.
- Triple-Tap: Select the paragraph surrounding the tapped location
- Drag: Move a collapsed selection wherever the user drags, while displaying a magnifying glass.
Drag handles, a magnifying glass, and an editing toolbar are displayed based on how the user interacts with this widget. Those UI elements are controller via the given editingOverlayController.
The text is auto-scrolled when the user drags a collapsed caret in this widget. The auto-scrolling is handled by the given textScrollController.
Selection changes are made via the given textController.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- IOSTextFieldTouchInteractor
Constructors
-
IOSTextFieldTouchInteractor.new({Key? key, required FocusNode focusNode, List<
SuperTextFieldTapHandler> tapHandlers = const [], required LayerLink textFieldLayerLink, required ImeAttributedTextEditingController textController, required IOSEditingOverlayController editingOverlayController, required TextScrollController textScrollController, required GlobalKey<ProseTextState< selectableTextKey, required Rect? getGlobalCaretRect(), required bool isMultiline, required Color handleColor, bool showDebugPaint = false, required Widget child})StatefulWidget> > -
const
Properties
- child → Widget
-
The child widget.
final
- editingOverlayController → IOSEditingOverlayController
-
final
- focusNode → FocusNode
-
FocusNode for the text field that contains this
IOSTextFieldInteractor
.final - getGlobalCaretRect → Rect? Function()
-
A function that returns the current caret global rect, or
null
if no caret exists.final - handleColor → Color
-
The color of expanded selection drag handles.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isMultiline → bool
-
Whether the text field that owns this
IOSTextFieldInteractor
is a multiline text field.final - key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
selectableTextKey
→ GlobalKey<
ProseTextState< StatefulWidget> > -
GlobalKey that references the widget that contains the field's
text.
final
- showDebugPaint → bool
-
Whether to paint debugging guides and regions.
final
-
tapHandlers
→ List<
SuperTextFieldTapHandler> -
Optional list of handlers that respond to taps on content, e.g., opening
a link when the user taps on text with a link attribution.
final
- textController → ImeAttributedTextEditingController
-
TextController
used to read the current selection to display editing controls, and used to update the selection based on user interactions.final - textFieldLayerLink → LayerLink
-
LayerLink that follows the text field that contains this
IOSExtFieldInteractor
.final - textScrollController → TextScrollController
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → IOSTextFieldTouchInteractorState -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- useIosSelectionHeuristics ↔ bool
-
Whether to adjust the user's selection similar to the way iOS does.
getter/setter pair