Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onAreaTapped ran even though the guardComingFrom prevented the animation #3

Open
ljubenvassilev opened this issue Jun 14, 2019 · 1 comment

Comments

@ljubenvassilev
Copy link

It would make so much more sense if the developer doesn't have to make the same check that you have already made to prevent the playing of the animation.
I'm using code from your tutorial:
ActiveArea(
area: Rect.fromLTWH(
animationWidthThirds * 2,
0,
animationWidthThirds,
halfAnimationHeight,
),
guardComingFrom: ['deactivate'], //this helps to control the animation itself
animationName: 'image_tapped',
onAreaTapped: () { //makes no sense to call this function
print('Picture!'); //if you don't play the animation
},
),

I hope my suggestion makes sense and the outcome improves this awesome library!

@FilledStacks
Copy link
Owner

If you're saying I shouldn't fire onAreaTapped when the animation is guarded against then I agree with you. I should definitely do that. I'm tight on time now, so it'll be a while before I can get to this but I'll add it to my list.

Thanks for checking it out. I'll keep this open until I've updated the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants