feat(flutter): 播放页互动数量与评论面板收紧
This commit is contained in:
1 parent
e39aa766ac
commit
bed6bbb75b
13 files changed
+265
-59
No files matched your search
@@ -0,0 +1,9 @@
|
||||
// Author: fruit.com.cn
|
||||
|
||||
/// 互动数量展示:不足一万显示原数,一万及以上显示一位小数的「万」。
|
||||
///
|
||||
/// 例:`3200` → `3200`,`12400` → `1.2万`。
|
||||
String formatInteractionCount(int count) {
|
||||
if (count < 10000) return '$count';
|
||||
return '${(count / 10000).toStringAsFixed(1)}万';
|
||||
}
|
||||
Reference in new issue
Block a user