getCardMessageTemplate method
override this to alter template for messages of type MessageTypeConstants.card
Implementation
@override
CometChatMessageTemplate getCardMessageTemplate(CometChatTheme theme) {
return CometChatMessageTemplate(
// name: MessageTypeConstants.text,
type: MessageTypeConstants.card,
category: MessageCategoryConstants.interactive,
contentView: (BaseMessage message, BuildContext context,
BubbleAlignment alignment,
{AdditionalConfigurations? additionalConfigurations}) {
CardMessage cardMessage = message as CardMessage;
if (message.deletedAt != null) {
return getDeleteMessageBubble(message, theme);
}
return CometChatUIKit.getDataSource().getCardMessageContentView(
cardMessage, context, alignment, theme);
},
options: CometChatUIKit.getDataSource().getCardMessageOptions,
bottomView: CometChatUIKit.getDataSource().getBottomView);
}