TextSelectionGestureDetector 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

TextSelectionGestureDetector({Key key, GestureTapDownCallback onTapDown, GestureForcePressStartCallback onForcePressStart, GestureForcePressEndCallback onForcePressEnd, GestureTapUpCallback onSingleTapUp, GestureTapCancelCallback onSingleTapCancel, GestureLongPressDragStartCallback onSingleLongTapStart, GestureLongPressDragUpdateCallback onSingleLongTapDragUpdate, GestureLongPressDragUpCallback onSingleLongTapUp, GestureTapDownCallback onDoubleTapDown, HitTestBehavior behavior, @required Widget child })
Create a TextSelectionGestureDetector. [...]
const

Properties

behavior HitTestBehavior
How this gesture detector should behave during hit testing. [...]
final
child Widget
Child below this widget.
final
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
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 ForcePressGestureDetector.startPressure.
final
onSingleLongTapDragUpdate GestureLongPressDragUpdateCallback
Called after onSingleLongTapStart when the pointer is dragged.
final
onSingleLongTapStart GestureLongPressDragStartCallback
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
onSingleLongTapUp GestureLongPressDragUpCallback
Called after onSingleLongTapStart when the pointer is lifted.
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 onSingleTapDown 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
hashCode int
The hash code for this object. [...]
read-only, inherited
key Key
Controls how one widget replaces another widget in the tree. [...]
final, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

createState() State<StatefulWidget>
Creates the mutable state for this widget at a given location in the tree. [...]
override
createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree. [...]
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children. [...]
@protected, inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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.debug }) String
Returns 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 ==(dynamic other) bool
The equality operator. [...]
inherited