EditorTextSelectionGestureDetector class

A gesture detector to respond to non-exclusive event chains for a text field.

An ordinary GestureDetector configured to handle events like tap and double tap will only recognize one or the other. This widget detects both: first the tap and then, if another tap down occurs within a time limit, the double tap.

See also:

  • TextField, a Material text field which uses this gesture detector.
  • CupertinoTextField, a Cupertino text field which uses this gesture detector.
Inheritance

Constructors

EditorTextSelectionGestureDetector({required Widget child, GestureTapDownCallback? onTapDown, GestureForcePressStartCallback? onForcePressStart, GestureForcePressEndCallback? onForcePressEnd, GestureTapUpCallback? onSingleTapUp, GestureTapCancelCallback? onSingleTapCancel, GestureTapDownCallback? onSecondaryTapDown, GestureTapUpCallback? onSecondarySingleTapUp, GestureTapCancelCallback? onSecondarySingleTapCancel, GestureTapDownCallback? onSecondaryDoubleTapDown, GestureLongPressStartCallback? onSingleLongTapStart, GestureLongPressMoveUpdateCallback? onSingleLongTapMoveUpdate, GestureLongPressEndCallback? onSingleLongTapEnd, GestureTapDownCallback? onDoubleTapDown, GestureDragStartCallback? onDragSelectionStart, GestureDragEndCallback? onDragSelectionEnd, HitTestBehavior? behavior, bool detectWordBoundary = true, Key? key})
Create a EditorTextSelectionGestureDetector.
const

Properties

behavior HitTestBehavior?
How this gesture detector should behave during hit testing.
final
child Widget
Child below this widget.
final
detectWordBoundary bool
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onDoubleTapDown GestureTapDownCallback?
Called after a momentary hold or a short tap that is close in space and time (within kDoubleTapTimeout) to a previous short tap.
final
onDragSelectionEnd GestureDragEndCallback?
Called when a mouse that was previously dragging is released.
final
onDragSelectionStart GestureDragStartCallback?
Called when a mouse starts dragging to select text.
final
onForcePressEnd GestureForcePressEndCallback?
Called when a pointer that had previously triggered onForcePressStart is lifted off the screen.
final
onForcePressStart GestureForcePressStartCallback?
Called when a pointer has tapped down and the force of the pointer has just become greater than ForcePressGestureRecognizer.startPressure.
final
onSecondaryDoubleTapDown GestureTapDownCallback?
onDoubleTap for mouse right click
final
onSecondarySingleTapCancel GestureTapCancelCallback?
onTapCancel for mouse right click
final
onSecondarySingleTapUp GestureTapUpCallback?
onTapUp for mouse right click
final
onSecondaryTapDown GestureTapDownCallback?
onTapDown for mouse right click
final
onSingleLongTapEnd GestureLongPressEndCallback?
Called after onSingleLongTapStart when the pointer is lifted.
final
onSingleLongTapMoveUpdate GestureLongPressMoveUpdateCallback?
Called after onSingleLongTapStart when the pointer is dragged.
final
onSingleLongTapStart GestureLongPressStartCallback?
Called for a single long tap that's sustained for longer than kLongPressTimeout but not necessarily lifted. Not called for a double-tap-hold, which calls onDoubleTapDown instead.
final
onSingleTapCancel GestureTapCancelCallback?
Called for each touch that becomes recognized as a gesture that is not a short tap, such as a long tap or drag. It is called at the moment when another gesture from the touch is recognized.
final
onSingleTapUp GestureTapUpCallback?
Called for each distinct tap except for every second tap of a double tap. For example, if the detector was configured with onTapDown and onDoubleTapDown, three quick taps would be recognized as a single tap down, followed by a double tap down, followed by a single tap down.
final
onTapDown GestureTapDownCallback?
Called for every tap down including every tap down that's part of a double click or a long press, except touches that include enough movement to not qualify as taps (e.g. pans and flings).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<StatefulWidget>
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}) 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