opt dyn badge

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-31 17:56:29 +08:00
parent b990f9cf87
commit 6147df2030
6 changed files with 49 additions and 19 deletions

View File

@@ -42,14 +42,26 @@ Widget livePanelSub(
PBadge(
text: content.watchedShow?.textLarge,
top: 6,
right: 56,
right: 70,
fontSize: 10.5,
type: PBadgeType.gray,
),
PBadge(
text: content.liveStatus == 1 ? '直播中' : '直播结束',
top: 6,
right: 6,
),
if (content.liveStatus == 1)
Positioned(
right: 6,
top: 6,
child: Image.asset(
height: 16,
'assets/images/live/live.gif',
filterQuality: FilterQuality.low,
),
)
else
const PBadge(
text: '直播结束',
top: 6,
right: 6,
),
if (content.areaName != null)
Positioned(
left: 0,

View File

@@ -41,14 +41,27 @@ Widget liveRcmdPanel(
PBadge(
text: liveRcmd.watchedShow?.textLarge,
top: 6,
right: 56,
right: 65,
fontSize: 10.5,
type: PBadgeType.gray,
),
PBadge(
text: liveRcmd.liveStatus == 1 ? '直播中' : '直播结束',
top: 6,
right: 6,
),
if (liveRcmd.liveStatus == 1)
Positioned(
right: 6,
top: 6,
child: Image.asset(
height: 16,
'assets/images/live/live.gif',
filterQuality: FilterQuality.low,
),
)
else
const PBadge(
text: '直播结束',
top: 6,
right: 6,
type: PBadgeType.gray,
),
if (liveRcmd.areaName != null)
Positioned(
left: 0,

View File

@@ -76,9 +76,10 @@ Widget videoSeasonWidget(
right: 10.0,
bottom: null,
left: null,
type: itemContent.badge!.text == '充电专属'
? PBadgeType.error
: PBadgeType.primary,
type: switch (itemContent.badge!.text) {
'充电专属' => PBadgeType.error,
_ => PBadgeType.primary,
},
),
Positioned(
left: 0,