marquee
一个无限滚动文本的 Flutter 小部件。提供多种自定义选项,包括自定义滚动方向、持续时间、曲线以及每轮之后的暂停。
一个可无限滚动文本的 Flutter 小部件。提供多种自定义选项,包括自定义滚动方向和速度、每轮滚动后的暂停,以及指定加速和减速的自定义持续时间和曲线。
^4.1.1{"sdk":"flutter"}{"sdk":"flutter"}以下为英文项目原文快照,最新内容请访问 GitHub。
⏩ A Flutter widget that scrolls text infinitely. Provides many customizations including custom scroll directions, durations, curves as well as pauses after every round.
Appreciate the widget? Show some ❤️ and star the repo to support the project.
This is a minimalistic example:
Marquee(
text: 'There once was a boy who told this story about a boy: "',
)
And here's a piece of code that makes full use of the marquee's customizability:
Marquee(
text: 'Some sample text that takes some space.',
style: TextStyle(fontWeight: FontWeight.bold),
scrollAxis: Axis.horizontal,
crossAxisAlignment: CrossAxisAlignment.start,
blankSpace: 20.0,
velocity: 100.0,
pauseAfterRound: Duration(seconds: 1),
startPadding: 10.0,
accelerationDuration: Duration(seconds: 1),
accelerationCurve: Curves.linear,
decelerationDuration: Duration(milliseconds: 500),
decelerationCurve: Curves.easeOut,
)
For more information about the properties, have a look at the API reference.