Taps, drags, and other gestures

UI

Advanced

Taps, drags, and other gestures

Pointers

Gestures

Adding gesture detection to widgets
Gesture disambiguation

This document explains how to listen for, and respond to,
gestures in Flutter. Examples of gestures include
taps, drags, and scaling.

The gesture system in Flutter has two separate layers.
The first layer has raw pointer events that describe
the location and movement of pointers (for example,
touches, mice, and styli) across the screen.
The second layer has gestures that describe semantic
actions that consist of one or more pointer movements.

Pointers

Pointers represent raw data about the user’s interaction
with the device’s screen.
There are four types of pointer events:

PointerDownEvent

The pointer has contacted the screen at a particular location.