show video label

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-07-18 18:32:12 +08:00
parent 473515efc5
commit f7184aff4e
3 changed files with 86 additions and 28 deletions

View File

@@ -99,7 +99,30 @@ class VideoCardVMemberHome extends StatelessWidget {
size: PBadgeSize.small,
type: PBadgeType.gray,
text: DurationUtil.formatDuration(videoItem.duration),
),
if (videoItem.badges?.isNotEmpty == true)
PBadge(
text: videoItem.badges!
.map((e) => e.text ?? '')
.join('|'),
top: 6,
right: 6,
type: videoItem.badges!.first.text == '充电专属'
? PBadgeType.error
: PBadgeType.primary,
)
else if (videoItem.isCooperation == true)
const PBadge(
text: '合作',
top: 6,
right: 6,
)
else if (videoItem.isSteins == true)
const PBadge(
text: '互动',
top: 6,
right: 6,
),
],
);
},