[Breaking Change] Fixing AnimationDirection for AnimationController.animateWith() and AnimationController.rpeat(reverse:true)

47 views
Skip to first unread message

Michael Goderbauer

unread,
Aug 7, 2019, 12:40:17 PM8/7/19
to flutter-...@googlegroups.com
Hello,

I would like to change how the AnimationStatus is reported via AnimationCotroller.status while a simulation is running via AnimationController.animateWith() or while an animation triggered by AnimationController.repeat() is running.

Currently (without the proposed change) AnimationController.status would report the direction of the last animation that was running prior to triggering the new animation. This doesn't make much sense since both methods are independent from the previous animation.

In #37739 I am proposing to change this as follows:
  • Simulations started with AnimationController.animateWith() will always report AnimationStatus.forward for the duration of the simulation.
  • AnimationController.repeat() will report AnimationStatus.forward while running from min to max and AnimationStatus.reverse while running from max to min (via the reverse flag).
I am not expecting that this change would impact any code since the previous behavior doesn't make much sense.

Please comment on the PR if you see any issues with this change.

Michael
Reply all
Reply to author
Forward
0 new messages