Android App Development
iOS App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!
Deniel Kerr
Owner and Founder. Opencart
Top Partners
Before starting our Blog topic Gestures In Flutter, we will discuss in short what is Gestures and why we need them? Gestures are basically the touch event on mobile that intentionally active some event defined for that gesture.
Flutter provides an in-build invisible widget called GestureDetector, which supports all types of click events and other gestures used in mobile application development. GestureDetector captures the gesture and performs the events on the basis of the click.The following are common gestures captured by the GestureDetector widget, their corresponding events are as follows:
GestureDetector
When the user normally clicks on the screen. Following are the events inside this gesture. 1.0 onTapDown 1.1 onTapUp 1.2 onTap 1.3 onTapCancel
When the user clicks the screen on the same location in a quick time this will lead to triggering the double-tap gesture. Following are the events inside this gesture. 2.0 onDoubleTap 2.1 onDoubleTapDown 2.3 onDoubleTapCancel
When the user makes contact with a screen in the same location for a long time will lead to a Long Press gesture. Following are the events inside this gesture. 3.0 onLongPressDown 3.1 onLongPressStart 3.2 onLongPress 3.3 onLongPressMoveUpdate 3.4 onLongPressEnd 3.5 onLongPressUp 3.6 onLongPressCancel
When the user made contact with the screen and moves the finger in a vertical direction without removing the contact from the screen. Following are the events inside this gesture. 4.0 onVerticalDragStart 4.1 onVerticalDragUpdate 4.2 onVerticalDragEnd
When the user made contact with the screen and moves the finger in a horizontal direction without removing the contact from the screen. Following are the events inside this gesture. 5.0 onHorizontalDragStart 5.1 onHorizontalDragUpdate 5.2 onHorizontalDragEnd
Conclusion:
Hope this blog helps you to understand the basic uses of Gestures In Flutter as well as GestureDetector Widget. You can use the gestures in your application as per your need.
Thank you for reading!!
For more information, you can visit the Dev Console.
Your email address will not be published. Required fields are marked*
Name*
Email*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
Webkul is a truly trusted and supported IT Company to develop business ideas for e-commerce. They provide professional support after deploying the solution to production and be responsible to act for fixing the reported issues or system errors. We highly encourage to deal with Webkul for business development.
Hussein Zawia
Co-founder, 24Dokan
USA
India
Global
Name
Email
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.