mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
count format
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -163,7 +163,8 @@ class _ArticleListPageState extends State<ArticleListPage> {
|
||||
Text.rich(
|
||||
TextSpan(
|
||||
children: [
|
||||
TextSpan(text: '${item.articlesCount}篇专栏'),
|
||||
TextSpan(
|
||||
text: '${Utils.numFormat(item.articlesCount)}篇专栏'),
|
||||
divider,
|
||||
TextSpan(text: '${Utils.numFormat(item.words)}个字'),
|
||||
divider,
|
||||
|
||||
@@ -119,9 +119,9 @@ Widget videoSeasonWidget(
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
],
|
||||
Text('${itemContent.stat?.play}次围观'),
|
||||
Text('${Utils.numFormat(itemContent.stat?.play)}次围观'),
|
||||
const SizedBox(width: 6),
|
||||
Text('${itemContent.stat?.danmu}条弹幕'),
|
||||
Text('${Utils.numFormat(itemContent.stat?.danmu)}条弹幕'),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
'assets/images/play.png',
|
||||
|
||||
@@ -374,7 +374,7 @@ class _PgcReviewChildPageState extends State<PgcReviewChildPage>
|
||||
() => _controller.count.value == null
|
||||
? const SizedBox.shrink()
|
||||
: Text(
|
||||
'${_controller.count.value}条点评',
|
||||
'${Utils.numFormat(_controller.count.value)}条点评',
|
||||
style: const TextStyle(fontSize: 13),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -214,7 +214,7 @@ class Utils {
|
||||
|
||||
static String numFormat(dynamic number) {
|
||||
if (number == null) {
|
||||
return '00:00';
|
||||
return '0';
|
||||
}
|
||||
if (number is String) {
|
||||
number = int.tryParse(number) ?? number;
|
||||
|
||||
Reference in New Issue
Block a user