Reputation: 889
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:
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?
Upvotes: 3
Views: 5444
Reputation: 10885
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.
Upvotes: 3