Reputation: 120439
I'm using Flutter for my mobile app. My designer told me to use a "two-finger rotate" gesture for one of our screens. How do I implement this with Flutter?
Upvotes: 1
Views: 1337
Reputation: 276881
I hope I'm wrong. But it doesn't seems like this has been implemented yet.
Ideally you should create a RotationGestureRecognizer
that extends OneSequenceGestureRecognizer
; which can then be added in GestureDetector
(and submit a cool pull request). You can use ScaleGestureRecognizer
as exemple.
You could also use onPanDown
, onPanUpdate
and onPanEnd
to keep the position of all pointers. And use the onPanUpdate
delta to calculate the rotation.
Upvotes: 2