[英]what's difference between Animation and Animatable in flutter
i read我读
A Tween inherits from Animatable, not from Animation. Tween 继承自 Animatable,而不是 Animation。 An Animatable, like Animation, doesn't have to output double. Animatable,如 Animation,不必将 output 加倍。 For example, ColorTween specifies a progression between two colors.例如,ColorTween 指定两个 colors 之间的级数。
in Tween description but i can't undrestand wht's that在Tween 描述中,但我无法理解那是什么
The main idea is that Animatable<T> can produce values which not need to be type of double .主要思想是 Animatable<T> 可以产生不需要是double类型的值。 This values produced based on double values inputed to Tween.此值基于输入到 Tween 的双精度值生成。 So, you can change values of Offset, or Color from blue to green, or some other type <T>.因此,您可以将 Offset 或 Color 的值从蓝色更改为绿色,或其他类型的 <T>。 Input values from 0.0 to 1.0 -> output from Blue to Green输入值从 0.0 到 1.0 -> output 从蓝色到绿色
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.