Flutter does provide common widgets handling tap, such as IconButton. But sometimes, you need to detect gestures on a custom view: here comes GestureDetector!
How to add a GestureDetector
To follow the code tutorial, create a new app as follows.
1 |
flutter create gesturedetectorexample |
If you’re unsure how to set up a Flutter app, check out Getting started with Flutter official tutorial.
Continue reading “How to implement a GestureDetector in Flutter?”
Mobile app developer with 14 years experience. Started with the Android SDK in 2010 and switched to Flutter in 2017. Past apps range from start ups to large tech (Google) and non tech (British Airways) companies, in various sectors (transport, commercial operations, e-commerce).