cm unread message count

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-07-05 17:01:33 +08:00
parent 769e46d3e6
commit 7c4c69aa75
3 changed files with 20 additions and 6 deletions

View File

@@ -160,8 +160,22 @@ class ConnectionManagerState extends State<ConnectionManager> {
child: label),
Obx(() => Offstage(
offstage:
!(client?.hasUnreadChatMessage.value ?? false),
child: Icon(Icons.circle, color: Colors.red, size: 10)))
!((client?.unreadChatMessageCount.value ?? 0) > 0),
child: Container(
width: 16,
height: 16,
decoration: BoxDecoration(
color: Colors.red,
shape: BoxShape.circle,
),
child: Center(
child: Text(
"${client?.unreadChatMessageCount.value ?? 0}",
maxLines: 1,
style: TextStyle(
color: Colors.white, fontSize: 10)),
),
).marginOnly(left: 4)))
],
);
},