Skip to content
Discussion options

You must be logged in to vote

I ran into the same issue where onTapDown was not triggering, even though everything seemed set up correctly.

In my case, the problem turned out to be related to how I was assigning the decorator.

Initially I had:

Ball(position: Vector2(100, 100))
  ..decorator = PaintDecorator.tint(
    const Color.fromARGB(180, 219, 120, 21),
  );

After changing it to:

Ball(position: Vector2(100, 100))
  ..decorator.addLast(
    PaintDecorator.tint(
      const Color.fromARGB(180, 219, 120, 21),
    ),
  );

onTapDown started working as expected.


Notes

  • I also verified that TapCallbacks was added and the component had a defined size
  • It’s possible that directly overriding decorator interferes with the co…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@spydon
Comment options

Answer selected by spydon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants