1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
use super::AnimationStatus;
pub struct Animation<T> {
// Whether this animation is stopped at the end.
pub is_completed: bool,
// Whether this animation is stopped at the beginning.
pub is_dismissed: bool,
// The current status of this animation.
pub status: AnimationStatus,
// The current value of the animation.
pub value: T,
}
impl<T> Animation<T> {
// Calls the listener every time the value of the animation changes.
// addListener(VoidCallback listener) → void
// Calls listener every time the status of the animation changes.
// addStatusListener(AnimationStatusListener listener) → void
// Chains a Tween (or CurveTween) to this Animation.
// drive<U>(Animatable<U> child) → Animation<U>
// Stop calling the listener every time the value of the animation changes.
// removeListener(VoidCallback listener) → void
// Stops calling the listener every time the status of the animation changes.
// removeStatusListener(AnimationStatusListener listener) → void
}