From 1dd7b9ed0a8ef2dfac4d45f13115240a166df89a Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Wed, 1 Jan 2025 10:27:34 +0800 Subject: [PATCH] opt: numFormat Signed-off-by: bggRGjQaUbCoE --- lib/common/widgets/video_card_v.dart | 14 +++++++++----- lib/pages/rcmd/view.dart | 5 ++++- lib/utils/utils.dart | 5 ++++- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/lib/common/widgets/video_card_v.dart b/lib/common/widgets/video_card_v.dart index 9c6e1602..47b59733 100644 --- a/lib/common/widgets/video_card_v.dart +++ b/lib/common/widgets/video_card_v.dart @@ -246,7 +246,8 @@ class VideoCardV extends StatelessWidget { size: 'small', type: 'line', fs: 9, - ) + ), + const SizedBox(width: 2), ], if (videoItem.rcmdReason != null) ...[ PBadge( @@ -254,7 +255,8 @@ class VideoCardV extends StatelessWidget { stack: 'normal', size: 'small', type: 'color', - ) + ), + const SizedBox(width: 2), ], if (videoItem.goto == 'picture') ...[ const PBadge( @@ -263,7 +265,8 @@ class VideoCardV extends StatelessWidget { size: 'small', type: 'line', fs: 9, - ) + ), + const SizedBox(width: 2), ], if (videoItem.isFollowed == 1) ...[ const PBadge( @@ -271,7 +274,8 @@ class VideoCardV extends StatelessWidget { stack: 'normal', size: 'small', type: 'color', - ) + ), + const SizedBox(width: 2), ], Expanded( flex: 1, @@ -306,7 +310,7 @@ class VideoCardV extends StatelessWidget { view: videoItem.stat.view, goto: videoItem.goto, ), - const SizedBox(width: 6), + const SizedBox(width: 4), if (videoItem.goto != 'picture') statDanMu( context: context, diff --git a/lib/pages/rcmd/view.dart b/lib/pages/rcmd/view.dart index 078a42ea..df8aeb4f 100644 --- a/lib/pages/rcmd/view.dart +++ b/lib/pages/rcmd/view.dart @@ -84,7 +84,10 @@ class _RcmdPageState extends State physics: const AlwaysScrollableScrollPhysics(), slivers: [ SliverPadding( - padding: const EdgeInsets.only(top: StyleString.cardSpace), + padding: EdgeInsets.only( + top: StyleString.cardSpace, + bottom: MediaQuery.paddingOf(context).bottom, + ), sliver: Obx( () => _controller.loadingState.value is Loading || _controller.loadingState.value is Success diff --git a/lib/utils/utils.dart b/lib/utils/utils.dart index 17df1abb..d6224ad2 100644 --- a/lib/utils/utils.dart +++ b/lib/utils/utils.dart @@ -477,7 +477,10 @@ class Utils { return '00:00'; } if (number is String) { - return number; + number = int.tryParse(number) ?? number; + if (number is String) { + return number; + } } if (number >= 100000000) { return '${(number / 100000000).toStringAsFixed(1)}亿';