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

Stagger Animation doesn't play correctly on second trigger #144

Open
Icaroto opened this issue Dec 5, 2024 · 0 comments
Open

Stagger Animation doesn't play correctly on second trigger #144

Icaroto opened this issue Dec 5, 2024 · 0 comments

Comments

@Icaroto
Copy link

Icaroto commented Dec 5, 2024

Im creating around 7 buttons in a loop with the following animation:

  .animate(
                target: isOpened ? 1 : 0,
                delay: Duration(milliseconds: (i * 500)),
              )
              .scaleXY(
                delay: Duration(milliseconds: (i * 500)),
                duration: Duration(milliseconds: (200)),
              )

When I press the button that changes the state of isOpened, the animation starts well, each buttons shows up in order based on the delay. When I press again (isOpened = 0), they are gone all at the same time .
Now, when I press one more time (isOpened = 1), apart from the first button which appears first, all the others shows up at the same time right after. Am I missing something?

Is there a proper way to reset this animation or even control them?

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

1 participant