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) {
  return Expanded(
    child: TencentCloudChatThemeWidget(build: (context, colorTheme, textStyle) {
      Widget status = getLastMessageStatus(colorTheme);
      Widget draft = getDraftWidget(textStyle, colorTheme);
      Widget lastMessage = getLastMessageWidget(textStyle, colorTheme);
      Widget mentionedInfo = getGroupAtInfo(textStyle, colorTheme);
      return Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        mainAxisSize: MainAxisSize.max,
        children: [
          Text(
            widget.conversation.showName ?? widget.conversation.conversationID,
            style: TextStyle(
              fontSize: textStyle.fontsize_14,
              fontWeight: FontWeight.w600,
              color: colorTheme.conversationItemShowNameTextColor,
            ),
            maxLines: 1,
            overflow: TextOverflow.ellipsis,
          ),
          Row(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              draft,
              status,
              mentionedInfo,
              lastMessage,
            ],
          )
        ],
      );
    }),
  );
}