GestureDetector class
A widget that detects gestures.
Attempts to recognize gestures that correspond to its non-null callbacks.
See also:
- HitTestBehavior, behaviour of a GestureDetector
Constructors
- GestureDetector({Key? key, VoidCallback? onTap, VoidCallback? onDoubleTap, EventCallback? onTapEvent, EventCallback? onDoubleTapEvent, EventCallback? onMouseEnterEvent, EventCallback? onMouseLeaveEvent, HitTestBehavior behaviour = HitTestBehavior.deferToChild, required Widget child})
-
const
Properties
- behaviour → HitTestBehavior
-
Hit testing behaviour.
final
- child → Widget
-
Child widget.
finalinherited
- correspondingTag → DomTagType
-
Corresponding HTML tag to use to render this widget
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Keys help Rad identify which widgets have changed, are added, or are
removed when a widget has multiple sibling widgets.
finalinherited
- onDoubleTap → VoidCallback?
-
final
- onDoubleTapEvent → EventCallback?
-
final
- onMouseEnterEvent → EventCallback?
-
final
- onMouseLeaveEvent → EventCallback?
-
final
- onTap → VoidCallback?
-
final
- onTapEvent → EventCallback?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
widgetCaptureEventListeners
→ Map<
DomEventType, EventCallback?> -
Events that this widget is listening to in capturing phase.
no setterinherited
-
widgetEventListeners
→ Map<
DomEventType, EventCallback?> -
Events that this widget is listening to in bubbling phase.
no setteroverride
Methods
-
createRenderElement(
RenderElement parent) → RenderElement - Create element for current widget.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
shouldUpdateWidget(
Widget oldWidget) → bool -
Whether to update current widget.
override
-
shouldUpdateWidgetChildren(
Widget oldWidget, bool shouldUpdateWidget) → bool -
Whether to update current widget's children.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited