v0.3.4animated_flip_counter
一个隐式动画小部件,可从一个数字翻转到另一个数字,支持自定义样式、小数和负值。
653喜欢 7.2万近 30 天下载150Pub 分数
AndroidiOSWebmacOSWindowsLinux
一个隐式动画小部件,可从一个数字翻转到另一个数字。
以下为英文项目原文快照,最新内容请访问 GitHub。
An implicit animation widget that flips from one number to another.
It can be useful to display information that's constantly changing.
Simply pass in a value and an optional duration and curve, just like any other implicit animation widget in Flutter.
AnimatedFlipCounter(
duration: Duration(milliseconds: 500),
value: _value, // pass in a value like 2014
)
Use fractionDigits to specify how many digits to show after the decimal point. It handles negative values as well.
AnimatedFlipCounter(
value: _value,
fractionDigits: 2, // decimal precision
suffix: "%",
textStyle: TextStyle(
fontSize: 40,
color: _value >= 0 ? Colors.green : Colors.red,
),
)
Use the familiar TextStyle parameter for styling, and use prefix and suffix for additional texts.
AnimatedFlipCounter(
value: _value,
prefix: "Level ",
textStyle: TextStyle(
fontSize: 80,
fontWeight: FontWeight.bold,
letterSpacing: -8.0,
color: Colors.yellow,
shadows: [
BoxShadow(
color: Colors.orange,
offset: Offset(8, 8),
blurRadius: 8,
),
],
),
)
依赖清单 3 项
{"sdk":"flutter"}—{"sdk":"flutter"}先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗