getDefaultSubtitle method
Widget
getDefaultSubtitle(
- CometChatTheme theme, {
- required BuildContext context,
- required Conversation conversation,
- required bool showTypingIndicator,
- bool? hideThreadIndicator = true,
- String? threadIndicatorText,
- required CometChatConversationsController controller,
Implementation
Widget getDefaultSubtitle(CometChatTheme theme,
{required BuildContext context,
required Conversation conversation,
required bool showTypingIndicator,
bool? hideThreadIndicator = true,
String? threadIndicatorText,
required CometChatConversationsController controller}) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
if (hideThreadIndicator != null && hideThreadIndicator == false)
Text(
cc.Translations.of(context).inAThread,
style: conversationsStyle.threadIndicatorStyle ??
TextStyle(
color: theme.palette.getPrimary(),
fontWeight: theme.typography.subtitle1.fontWeight,
fontSize: theme.typography.subtitle1.fontSize,
fontFamily: theme.typography.subtitle1.fontFamily),
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
getReceiptIcon(theme,
conversation: conversation,
hideReceipt:
controller.getHideReceipt(conversation, disableReceipt)),
if (showTypingIndicator)
Text(
typingIndicatorText ??
((conversation.conversationWith is User)
? cc.Translations.of(context).isTyping
: "${controller.typingMap[conversation.conversationId]?.sender.name ?? ''} ${cc.Translations.of(context).isTyping}"),
style: conversationsStyle.typingIndicatorStyle ??
TextStyle(
color: theme.palette.getPrimary(),
fontWeight: theme.typography.subtitle1.fontWeight,
fontSize: theme.typography.subtitle1.fontSize,
fontFamily: theme.typography.subtitle1.fontFamily),
)
else
Expanded(
child: getSubtitle(theme, context, conversation, controller))
],
),
],
);
}