getUnreadCount method

Widget getUnreadCount(
  1. CometChatTheme theme,
  2. Conversation conversation
)

Implementation

Widget getUnreadCount(CometChatTheme theme, Conversation conversation) {
  return CometChatBadge(
    count: conversation.unreadMessageCount ?? 0,
    style: BadgeStyle(
      width: badgeStyle?.width ?? 25,
      height: badgeStyle?.height ?? 25,
      borderRadius: badgeStyle?.borderRadius ?? 100,
      textStyle: TextStyle(
              fontSize: theme.typography.subtitle1.fontSize,
              color: theme.palette.getAccent())
          .merge(badgeStyle?.textStyle),
      background: badgeStyle?.background ?? theme.palette.getPrimary(),
    ),
  );
}