gskinner / gskinner/flutter_animate

onComplete fires before onPlay on zero duration animations

Open
#152 1 comment 0 reactions 0 assignees View on GitHub
bug wontfix
Dominant language
Dart
Stars
1.1k
Forks
103
PR merge metrics
No merged PRs in 30d

Description

For example, this:

``` dart
.animate(
onInit: (controller) => print('init'),
onPlay: (controller) => print('play'),
onComplete: (controller) => print('complete'),
)
.slideY(duration: 0.ms)
```

Will print:

```
flutter: init
flutter: complete
flutter: play
```

This is because we need to fire `onPlay` after the animation is started (so it can be stopped in the onPlay), but a zero duration controller instantly updates it's status as `completed`.

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.