Handling multitouch in flutter
Looks like you are looking for MultiDragGestureRecognizer. Look into this thread to know more.
Edit : There is no direct widget that you can use. You'll need to create a StatefulWidget that instantiates the MultiDragGestureRecognizer, then have your build function have a Listener that routes the onPointerDown event to the recognizer.
Michael Kanzieper
Updated on December 07, 2022Comments
-
Michael Kanzieper over 1 year
In flutter, there is a standard GestureDetector that allows to interprets the commands "touch down", "touch move" and "touch up" by means of the corresponding handlers:
- onPanStart: _handlePanStart,
- onPanUpdate: _handlePanUpdate,
- onPanEnd: _handlePanEnd,
However, we are talking about processing a single touch, but what if I want to handle several parallel touches and movements? I.e. really use multitouch? Is there any kind of built-in control in flutter (maybe multitouch gesture detector, I don't known) that allows to get a vector or a list of events of clicks, movements, ups with ids of touches and their current coordinates?
-
pskink over 5 yearssee
Listener
class (and itsonPointer*
properties) or you simply needGestureDetector#onScale*
properties?