Skip to content

onComplete fires before onPlay on zero duration animations #152

@gskinner

Description

@gskinner

For example, this:

.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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions