Handling user gestures
A mobile application would be very limited without some kind of interactivity. The Flutter framework allows you to handle user gestures in every possible way, from simple taps to drag and pan gestures. The screen events in Flutter’s gesture system are separated into two layers, as follows:
- Pointers layer: This layer holds the raw information about how a pointer (for example, a touch, mouse, or stylus) is interacting with the screen. This raw data will include the location and movement of the pointer.
- Gestures layer: This layer takes multiple pointer actions and tries to assign them some meaning as a user action. These semantic actions (for example, a tap, drag, or scale) are often more useful to the application, and they are the most typical way of implementing user input handling.
Let’s go over these two layers in more detail.
Pointers
Flutter starts screen input handling in the low-level pointer layer. Generally, there...