Flutter handles touch gestures (taps, swipes, drags, pinches) through gesture-detecting widgets like GestureDetector and InkWell, plus built-in widget interactions. Understanding gesture handling is essential for building interactive apps.
GestureDetector — detect gestures
// GestureDetector wraps a widget and detects gestures on it
GestureDetector(
onTap: () => print('tapped'),
onDoubleTap: () => print('double tapped'),
onLongPress: () => print('long pressed'),
onPanUpdate: (details) => print('dragging: ${details.delta}'), // drag
onScaleUpdate: (details) => print('pinch: ${details.scale}'), // pinch/zoom
child: Container(width: 100, height: 100, color: Colors.blue),
)
