TextSelectionGestureDetectorModifier 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
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- SingleChildStatelessModifier
- TextSelectionGestureDetectorModifier
- Available extensions
Constructors
- TextSelectionGestureDetectorModifier({Key? key, Key? modifierKey, Widget? child, GestureTapDownCallback? onTapDown, GestureForcePressStartCallback? onForcePressStart, GestureForcePressEndCallback? onForcePressEnd, GestureTapCallback? onSecondaryTap, GestureTapDownCallback? onSecondaryTapDown, GestureTapUpCallback? onSingleTapUp, GestureTapCancelCallback? onSingleTapCancel, GestureLongPressStartCallback? onSingleLongTapStart, GestureLongPressMoveUpdateCallback? onSingleLongTapMoveUpdate, GestureLongPressEndCallback? onSingleLongTapEnd, GestureTapDownCallback? onDoubleTapDown, GestureDragStartCallback? onDragSelectionStart, dynamic onDragSelectionUpdate, GestureDragEndCallback? onDragSelectionEnd, HitTestBehavior? behavior})
-
Create a TextSelectionGestureDetector.
const
Properties
- behavior → HitTestBehavior?
-
How this gesture detector should behave during hit testing.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- modifierKey → Key?
-
The actual key of the widget, which Modifier wrapped
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
- onDragSelectionUpdate → dynamic
-
Called repeatedly as a mouse moves while dragging.
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
- onSecondaryTap → GestureTapCallback?
-
Called for a tap event with the secondary mouse button.
final
- onSecondaryTapDown → GestureTapDownCallback?
-
Called for a tap down event with the secondary mouse button.
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
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
inherited
-
buildWithChild(
BuildContext context, Widget? child) → Widget -
A build method that receives an extra
child
parameter.override -
createElement(
) → SingleChildStatelessElement -
Create a SingleChildStatelessElement
inherited
-
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
-
modified(
) → Modifier -
Available on Widget, provided by the ModifierTransformer extension
Transform normal widget to Modifier -
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