-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
Hello,
I am making a widget that used onHorizontalDragUpdate and MediaQuery to find the X position such that it can be used to update the state of 5 rating stars. The idea is you can drag left and right and the starts go from 1 to 5.
I am trying to add the ability to tap on the stars, and I realized that my life would be so easy to use GestureDetector -> onTap to add this feature at the top level. But because onTap does not provide a details object with globalPosition it looks like my only option (that I am personally aware of) is to do a callback at the star object all the way through the tree to my list item object.
I see that onTap returns void, it would seem like a great opportunity to return some information about where on the screen has been tapped. It is, after all, GestureDetector, and not like a button.