Open mikaelho opened 2 years ago
Yes, this is called in Flutter terms "explicit" animations: https://www.youtube.com/watch?v=GXIJJkq_H8g What is currently implemented in Flet (and should be documented) are "implicit" animations.
Cancelling, pausing, back/forth are all responsibilities of AnimationController
which I was planning to expose in Flet API.
Thanks, good to hear. Looks like AnimationController has a addStatusListener that can be used to create events to Python, e.g. when the animation ends.
Once you have any animations, you typically run into the following use cases, in decreasing order of importance (my opinion):
Run several animations in parallel
I assume this is the base case and will be supported by default
Chaining animations, i.e. start another as soon as the first one finishes (maybe with a delay)
Could be supported with an event, but with the potential for network delay, perfect animations could probably not rely on that.
Canceling an animation, e.g. when user clicks a button
Python API would need a reference to the running animation.
Running the same animation back and forth
Pausing an animation with an option to continue (needs a reference, again)