Bhaineann Flutter le gestures tadhaim (taps, swipes, drags, pinches) trí ghréine a bhraitheann gestures mar GestureDetector agus InkWell, agus idirghníomhaíochtaí ionsuite in widgeataí. Tá tuiscint ar bhainistiú gesture riachtanach chun feidhmchlár idirghníomhach a thógáil.
GestureDetector — gestures a bhrath
// 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),
)
