EtchGestureDetector
I would like some sort of easy way to have a callback invoked when a touch is registered within a Etch geometry.
Not sure the best API design. Hit tests occur even if a cursor is just hovered/moved over a point on the screen I believe, and it is important to distinguish that from actual clicks, I would like to know about both though. Which means the custom paint would need to be wrapped in a GestureDetector or Listener widget or possibly both.
The main advantage over doing it outside of the etch package is that the transforms and shapes of the geometries are already given to etch, and so it seems natural to defer the bounds / intersection testing to etch as well.
Hey @TimWhiting 👋
This makes a lot of sense.
I'm trying to figure out a good way to add this to etch objects and paths but hopefully, I can get this out in the next major release of the package since this would actually simplify creating full-fledged Widgets with CustomPaint.
I'll try some implementations and let you know how it goes.
Thanks so much for the suggestion.