Your experience on this site will be improved by allowing cookies
Gestures are used to interact with an application. It is generally used in touch-based devices to physically interact with the application. It can be as simple as a single tap on the screen to a more complex physical interaction like swiping in a specific direction to scrolling down an application. It is heavily used in gaming and more or less every application requires it to function as devices turn more touch-based than ever. In this article, we will discuss them in detail.
Some widely used gestures are mentioned here :
The GestureDetector widget in flutter is used to detect physical interaction with the application on the UI. If a widget is supposed to experience a gesture, it is kept inside the GestureDetector widget. The same widget catches the gesture and returns the appropriate action or response.
Below is the list of gestures and their corresponding events :
Example:
|
Output:
Flutter supports Listener widgets that are low-level gesture detection mechanism. It detects user interaction and dispatches one of the below mentioned corresponding events:
Flutter also has widgets to do specific as well as advanced gestures. These widgets are as below :
0 comments