opt: numFormat

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-01-01 10:27:34 +08:00
parent b7768e5886
commit 1dd7b9ed0a
3 changed files with 17 additions and 7 deletions

View File

@@ -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,

View File

@@ -84,7 +84,10 @@ class _RcmdPageState extends State<RcmdPage>
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

View File

@@ -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)}亿';