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) {
  String timeText = getLastMessageTimeText();
  if (!hasLastMessage()) {
    return Container();
  }
  return TencentCloudChatThemeWidget(
    build: (context, colorTheme, textStyle) => Row(
      mainAxisAlignment: MainAxisAlignment.end,
      children: [
        Text(
          timeText,
          style: TextStyle(
            fontSize: textStyle.fontsize_12,
            fontWeight: FontWeight.w400,
            color: colorTheme.conversationItemTimeTextColor,
          ),
        ),
      ],
    ),
  );
}