From ac9a2349c039984cfbeba7868cfd540e5770f90a Mon Sep 17 00:00:00 2001 From: guozhigq Date: Thu, 25 Apr 2024 23:18:21 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20up=E6=8A=95=E7=A8=BF=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E5=85=85=E7=94=B5=E4=B8=93=E5=B1=9E=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common/widgets/video_card_h.dart | 9 +++++++++ lib/pages/member_archive/view.dart | 1 + 2 files changed, 10 insertions(+) diff --git a/lib/common/widgets/video_card_h.dart b/lib/common/widgets/video_card_h.dart index 99059a9e..25e701ac 100644 --- a/lib/common/widgets/video_card_h.dart +++ b/lib/common/widgets/video_card_h.dart @@ -23,6 +23,7 @@ class VideoCardH extends StatelessWidget { this.showView = true, this.showDanmaku = true, this.showPubdate = false, + this.showCharge = false, }); // ignore: prefer_typing_uninitialized_variables final videoItem; @@ -33,6 +34,7 @@ class VideoCardH extends StatelessWidget { final bool showView; final bool showDanmaku; final bool showPubdate; + final bool showCharge; @override Widget build(BuildContext context) { @@ -121,6 +123,13 @@ class VideoCardH extends StatelessWidget { // videoItem.rcmdReason.content != '') // pBadge(videoItem.rcmdReason.content, context, // 6.0, 6.0, null, null), + if (showCharge && videoItem?.isChargingSrc) + const PBadge( + text: '充电专属', + right: 6.0, + top: 6.0, + type: 'primary', + ), ], ); }, diff --git a/lib/pages/member_archive/view.dart b/lib/pages/member_archive/view.dart index 3103683a..f38ca0cb 100644 --- a/lib/pages/member_archive/view.dart +++ b/lib/pages/member_archive/view.dart @@ -79,6 +79,7 @@ class _MemberArchivePageState extends State { videoItem: list[index], showOwner: false, showPubdate: true, + showCharge: true, ); }, childCount: list.length,