gskinner / gskinner/flutter_animate

Stagger Animation doesn't play correctly on second trigger

Open
#144 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
1.1k
Forks
103
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.