简体   繁体   English

Animation 和 flutter 中的 Animatable 有什么区别

[英]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 thatTween 描述中,但我无法理解那是什么

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.

相关问题 Flutter中stack的children声明之间有什么区别 - What's the difference between stack's children declaration in Flutter flutter: raiseButton 和 Container 与 onTap() 有什么区别? - flutter: what's the difference between raisedButton and Container with onTap()? Flutter 的 TextBaseline 枚举中的字母和表意有什么区别 - What is the difference between alphabetic and ideographic in Flutter's TextBaseline enum Flutter中的风格主题和装饰有什么区别 - What's difference between Style Theme and Decoration in Flutter 颤振插件和颤振模块有什么区别? - What is the difference between flutter plugin and flutter module? flutter package 和 flutter 插件有什么区别 - what is the difference between flutter package and flutter plugin 如何将Android的DP转换为Flutter的LP? DP和LP有什么区别? - How to convert Android's DP to Flutter's LP? What is the difference between DP and LP? Flutter 中的 Scaffold 和 MaterialApp 有什么区别? - What is the difference between Scaffold and MaterialApp in Flutter? React Native 和 Flutter 有什么区别? - What is the difference between React Native and Flutter? Flutter 生成的 3 个 APK 有什么区别? - What is the difference between 3 APKs generated from flutter?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM