unreadCountWidget method
Widget
unreadCountWidget(
- dynamic context,
- TencentCloudChatThemeColors colorTheme,
- dynamic textStyle
Implementation
Widget unreadCountWidget(context, TencentCloudChatThemeColors colorTheme, textStyle) {
String text = unReadCountDisplayText();
return Container(
height: getHeight(16),
width: text.length == 1 ? getWidth(16) : getWidth(26),
decoration: BoxDecoration(
color: colorTheme.conversationItemUnreadCountBgColor,
borderRadius: BorderRadius.all(
Radius.circular(
getSquareSize(8),
),
),
),
child: Center(
child: Text(
text,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: getFontSize(10),
fontWeight: FontWeight.w600,
color: colorTheme.conversationItemUnreadCountTextColor,
),
),
),
);
}