GestureDetector is a non-visual widget primarily used for detecting the user’s gesture . To identify a gesture targeted on a widget, the widget can be placed inside GestureDetector widget.
Read moreWhich flutter widget is used to detect gestures?
The GestureDetector widget decides which gestures to attempt to recognize based on which of its callbacks are non-null.
Read more