From 772a6a9843a6757755e3bd111f966613bb9f2bd4 Mon Sep 17 00:00:00 2001 From: orz12 Date: Wed, 24 Jan 2024 12:38:10 +0800 Subject: [PATCH] =?UTF-8?q?mod:=20=E7=A7=81=E4=BF=A1=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=A1=B5=E6=94=AF=E6=8C=81=E6=9C=AA=E8=AF=BB=E6=9D=A1=E6=95=B0?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/whisper/view.dart | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/pages/whisper/view.dart b/lib/pages/whisper/view.dart index f2779a17..b26b9b86 100644 --- a/lib/pages/whisper/view.dart +++ b/lib/pages/whisper/view.dart @@ -140,14 +140,17 @@ class _WhisperPageState extends State { }, ), leading: Badge( - isLabelVisible: false, + isLabelVisible: + sessionList[i].unreadCount > 0, backgroundColor: Theme.of(context) .colorScheme .primary, - label: Text(sessionList[i] - .unreadCount - .toString()), - alignment: Alignment.bottomRight, + textColor: Theme.of(context) + .colorScheme + .onInverseSurface, + label: Text( + " ${sessionList[i].unreadCount.toString()} "), + alignment: Alignment.topRight, child: NetworkImgLayer( width: 45, height: 45,