kaboc/flutter_custom_text

Add another handler for events other than primary button press

kaboc opened this issue · 0 comments

kaboc commented

The following events are very common in desktop and web apps.

  • Secondary button press
  • Tertiary button press
  • Mouse enter and exit

I was thinking for a long time that these should be supported sometime, and now is the time because GestureDetails was added (#25). Its object containing gestureType is passed to handlers, making it possible to use a single handler to do different things depending on the type. The position of an event that is also contained in the object is useful to show a popup or a menu near the coordinate.

The existing onTap and onLongPress should not be integrated into the new handler. Taps and long-presses are most common use cases, so for convenience it is better to keep having individual handlers for them.