defaultBuilder method

  1. @override
Widget defaultBuilder(
  1. BuildContext context
)
override

Default builder for the widget, which is necessary and must been override.

Implementation

@override
Widget defaultBuilder(BuildContext context) {
  bool hasUnread = hasUnreadCount();
  int receiveOption = widget.conversation.recvOpt ?? 0;
  return TencentCloudChatThemeWidget(build: (context, colorTheme, textStyle) {
    if (receiveOption != 0) {
      return notificationOffWidget(colorTheme);
    } else {
      if (hasUnread) {
        return unreadCountWidget(context, colorTheme, textStyle);
      } else {
        return noUnreadPlaceHolderWidget();
      }
    }
  });
}