GestureDetector class Null safety

A widget that detects gestures.

Attempts to recognize gestures that correspond to its non-null callbacks.

See also:

Inheritance

Constructors

GestureDetector({Key? key, required Widget child, Callback? onTap, Callback? onDoubleTap, EventCallback? onTapEvent, EventCallback? onDoubleTapEvent, EventCallback? onMouseEnterEvent, EventCallback? onMouseLeaveEvent, HitTestBehavior behaviour = HitTestBehavior.deferToChild})
const

Properties

behaviour HitTestBehavior
Hit testing behaviour.
final
child Widget
final
correspondingTag DomTagType
Corresponding HTML tag to use to render this widget
@nonVirtual, read-only, override
hashCode int
The hash code for this object.
read-only, inherited
initialKey Key
final, inherited
onDoubleTap Callback?
final
onDoubleTapEvent EventCallback?
final
onMouseEnterEvent EventCallback?
final
onMouseLeaveEvent EventCallback?
final
onTap Callback?
final
onTapEvent EventCallback?
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
widgetCaptureEventListeners Map<DomEventType, EventCallback?>
Events that this widget is listening to in capturing phase.
read-only, inherited
widgetChildren List<Widget>
Child widgets if any.
read-only, override
widgetEventListeners Map<DomEventType, EventCallback?>
Events that this widget is listening to.
read-only, override
widgetType String
Type of widget.
@nonVirtual, read-only, override

Methods

createConfiguration() WidgetConfiguration
Create widget's configuration.
override
createRenderObject(BuildContext context) RenderObject
Called when framework needs a RenderObject for current widget.
@nonVirtual, override
isConfigurationChanged(WidgetConfiguration oldConfiguration) bool
Whether configuration has changed.
@nonVirtual, override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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