Flutter ટચ જેશ્ચર્સ (taps, swipes, drags, pinches) ને GestureDetector અને InkWell જેવા gesture-detecting widgets દ્વારા, અને બિલ્ટ-ઇન widget interactions દ્વારા હેન્ડલ કરે છે। Gesture handling સમજવું interactive apps બનાવવા માટે આવશ્યક છે.
GestureDetector — જેશ્ચર્સ ડિટેક્ટ કરો
// 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),
)
