To listen to gestures from the widgets layer, use a
GestureDetector.

Note:
  To learn more, watch this short Widget of the Week video on the GestureDetector widget:

If you’re using Material Components,
many of those widgets already respond to taps or gestures.
For example, IconButton and TextButton
respond to presses (taps), and ListView
responds to swipes to trigger scrolling.
If you are not using those widgets, but you want the
“ink splash” effect on a tap, you can use InkWell.

Gesture disambiguation

At a given location on screen, there might be multiple gesture
detectors. All of these gesture detectors listen to the stream
of pointer events as they flow past and attempt to recognize
specific gestures. The GestureDetector widget decides
which gestures to attempt to recognize based on which of its
callbacks are non-null.