用句子中的单词飘动的动画(淡入和缩放)
我想创建一个动画,其中一个句子中有三个词,第一个(来)逐渐淡入并留下然后,其字体增加了6个,所有单词都保持在下一个屏幕之前。我尝试了动画套件,这对我来说并不顺利。它做了什么,但我以某种方式无法延迟一个动画。我还不能同时在最后一句话上淡入淡出和缩放动画文本。我正在考虑使用动画控制器和tween,但不能同时进行淡入淡出和扩展。
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AnimatedTextKit(animatedTexts: [
FadeAnimatedText(
'COME',
textStyle: TextStyle(
fontSize: 18.0.sp,
fontWeight: FontWeight.w300,
color: Colors.white),
),
], isRepeatingAnimation: false),
AnimatedTextKit(
animatedTexts: [
FadeAnimatedText(
'HAVE',
textStyle: TextStyle(
fontSize: 18.0.sp,
fontWeight: FontWeight.w300,
color: Colors.white),
),
],
isRepeatingAnimation: false,
),
AnimatedTextKit(
animatedTexts: [
ScaleAnimatedText(
'FUN',
textStyle: TextStyle(
fontSize: 24.0.sp,
color: Colors.white,
),
),
],
isRepeatingAnimation: false,
),
],
),
I want to create a flutter animation where there are three words in a sentence, the first one (COME) fades in and stays, followed by the other word that fades(HAVE) in too then, the final one (FUN)fades in and then its font is increased by 6, all words stay before moving on to the next screen. I tried the Animated kit and it did not work out well for me. It does everthing but I somehow cannot delay one animation after the other. I cannot also have a fade-in and scale animated text at the same time on the last word.I am looking into using an animation controller and tween but cannot do a fade in and scale at the same time.
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AnimatedTextKit(animatedTexts: [
FadeAnimatedText(
'COME',
textStyle: TextStyle(
fontSize: 18.0.sp,
fontWeight: FontWeight.w300,
color: Colors.white),
),
], isRepeatingAnimation: false),
AnimatedTextKit(
animatedTexts: [
FadeAnimatedText(
'HAVE',
textStyle: TextStyle(
fontSize: 18.0.sp,
fontWeight: FontWeight.w300,
color: Colors.white),
),
],
isRepeatingAnimation: false,
),
AnimatedTextKit(
animatedTexts: [
ScaleAnimatedText(
'FUN',
textStyle: TextStyle(
fontSize: 24.0.sp,
color: Colors.white,
),
),
],
isRepeatingAnimation: false,
),
],
),
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论