From 5516a1ee01f7ab2f23b7aa9a7d7d8302574ec24b Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Sat, 9 Jul 2022 16:14:59 +0200 Subject: [PATCH] fix: Unread bubble is invisible in dark mode --- lib/pages/chat_list/chat_list_item.dart | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/pages/chat_list/chat_list_item.dart b/lib/pages/chat_list/chat_list_item.dart index f7cbded3..65114fa1 100644 --- a/lib/pages/chat_list/chat_list_item.dart +++ b/lib/pages/chat_list/chat_list_item.dart @@ -320,16 +320,22 @@ class ChatListItem extends StatelessWidget { color: room.highlightCount > 0 ? Colors.red : room.notificationCount > 0 - ? Theme.of(context).primaryColor - : Theme.of(context).primaryColor.withAlpha(100), + ? Theme.of(context).colorScheme.primary + : Theme.of(context).colorScheme.primaryContainer, borderRadius: BorderRadius.circular(AppConfig.borderRadius), ), child: Center( child: room.notificationCount > 0 ? Text( room.notificationCount.toString(), - style: const TextStyle( - color: Colors.white, + style: TextStyle( + color: room.highlightCount > 0 + ? Colors.white + : room.notificationCount > 0 + ? Theme.of(context).colorScheme.onPrimary + : Theme.of(context) + .colorScheme + .onPrimaryContainer, fontSize: 13, ), )