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