TextSelectionGestureDetectorBuilder class

Builds a TextSelectionGestureDetector to wrap an EditableText.

The class implements sensible defaults for many user interactions with an EditableText (see the documentation of the various gesture handler methods, e.g. onTapDown, onForcePressStart, etc.). Subclasses of TextSelectionGestureDetectorBuilder can change the behavior performed in responds to these gesture events by overriding the corresponding handler methods of this class.

The resulting TextSelectionGestureDetector to wrap an EditableText is obtained by calling buildGestureDetector.

A TextSelectionGestureDetectorBuilder must be provided a TextSelectionGestureDetectorBuilderDelegate, from which information about the EditableText may be obtained. Typically, the State of the widget that builds the EditableText implements this interface, and then passes itself as the delegate.

See also:

Constructors

TextSelectionGestureDetectorBuilder({required TextSelectionGestureDetectorBuilderDelegate delegate})
Creates a TextSelectionGestureDetectorBuilder.

Properties

delegate TextSelectionGestureDetectorBuilderDelegate
The delegate for this TextSelectionGestureDetectorBuilder.
final
editableText EditableTextState
The State of the EditableText for which the builder will provide a TextSelectionGestureDetector.
no setter
hashCode int
The hash code for this object.
no setterinherited
onUserTapAlwaysCalled bool
Whether the provided onUserTap callback should be dispatched on every tap or only non-consecutive taps.
no setter
renderEditable RenderEditable
The RenderObject of the EditableText for which the builder will provide a TextSelectionGestureDetector.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shouldShowSelectionToolbar bool
Whether to show the selection toolbar.
no setter

Methods

buildGestureDetector({Key? key, HitTestBehavior? behavior, required Widget child}) Widget
Returns a TextSelectionGestureDetector configured with the handlers provided by this builder.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onDoubleTapDown(TapDragDownDetails details) → void
Handler for TextSelectionGestureDetector.onDoubleTapDown.
onDragSelectionEnd(TapDragEndDetails details) → void
Handler for TextSelectionGestureDetector.onDragSelectionEnd.
onDragSelectionStart(TapDragStartDetails details) → void
Handler for TextSelectionGestureDetector.onDragSelectionStart.
onDragSelectionUpdate(TapDragUpdateDetails details) → void
Handler for TextSelectionGestureDetector.onDragSelectionUpdate.
onForcePressEnd(ForcePressDetails details) → void
Handler for TextSelectionGestureDetector.onForcePressEnd.
onForcePressStart(ForcePressDetails details) → void
Handler for TextSelectionGestureDetector.onForcePressStart.
onSecondaryTap() → void
Handler for TextSelectionGestureDetector.onSecondaryTap.
onSecondaryTapDown(TapDownDetails details) → void
Handler for TextSelectionGestureDetector.onSecondaryTapDown.
onSingleLongTapEnd(LongPressEndDetails details) → void
Handler for TextSelectionGestureDetector.onSingleLongTapEnd.
onSingleLongTapMoveUpdate(LongPressMoveUpdateDetails details) → void
Handler for TextSelectionGestureDetector.onSingleLongTapMoveUpdate.
onSingleLongTapStart(LongPressStartDetails details) → void
Handler for TextSelectionGestureDetector.onSingleLongTapStart.
onSingleTapCancel() → void
Handler for TextSelectionGestureDetector.onSingleTapCancel.
onSingleTapUp(TapDragUpDetails details) → void
Handler for TextSelectionGestureDetector.onSingleTapUp.
onTapDown(TapDragDownDetails details) → void
Handler for TextSelectionGestureDetector.onTapDown.
onTapTrackReset() → void
Handler for TextSelectionGestureDetector.onTapTrackReset.
onTapTrackStart() → void
Handler for TextSelectionGestureDetector.onTapTrackStart.
onTripleTapDown(TapDragDownDetails details) → void
Handler for TextSelectionGestureDetector.onTripleTapDown.
onUserTap() → void
Handler for TextSelectionGestureDetector.onUserTap.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited