Flutter हातोड्या (taps, swipes, drags, pinches) GestureDetector आणि InkWell सारख्या हातोड्या-शोधणारी विजेट आणि बिल्ट-इन विजेट परस्परक्रिया यांच्या माध्यमातून हाताळते. हातोड्या हाताळणे समजून घेणे हे इंटरअॅक्टिव अॅप्लिकेशन तयार करण्यासाठी आवश्यक आहे.
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),
)
