Use a Stack to put a layer of red Text on top of a layer of white Text. And then use ClipRect to slowly show the top layer.
Basically:
Stack
[
- ClipRect
- Red Text
- White Text
]
The most difficulty part is "time sync", i.e. to know the speed of the flow, because in a song, some words are gonna be much faster than other words. Tell us your plan of time sync, and I can further suggest which type of animation controller is best for this task.
发布评论
评论(2)
您可以使用animated_text_kit包
https://pub.dev/packages/animated_text_kit
you can use animated_text_kit package
https://pub.dev/packages/animated_text_kit
使用
Stack
将红色Text
层放置在白色Text
层之上。然后使用ClipRect
慢慢显示顶层。基本上:
最困难的部分是“时间同步”,即知道流动的速度,因为在歌曲中,某些单词会比其他单词快得多。告诉我们您的时间同步计划,我可以进一步建议哪种类型的动画控制器最适合此任务。
Use a
Stack
to put a layer of redText
on top of a layer of whiteText
. And then useClipRect
to slowly show the top layer.Basically:
The most difficulty part is "time sync", i.e. to know the speed of the flow, because in a song, some words are gonna be much faster than other words. Tell us your plan of time sync, and I can further suggest which type of animation controller is best for this task.