MessagesDataSource class

MessagesDataSource is a Utility class that provides default templates to construct message bubbles and also provides the default set of options available for each message bubble

Implemented types

Constructors

MessagesDataSource.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addList() String
attachPhoto(BuildContext context, CometChatColorPalette colorPalette, CometChatTypography typography, CometChatAttachmentOptionSheetStyle? style) CometChatMessageComposerAction
attachVideo(BuildContext context, CometChatColorPalette colorPalette, CometChatTypography typography, CometChatAttachmentOptionSheetStyle? style) CometChatMessageComposerAction
audioAttachmentOption(BuildContext context, CometChatColorPalette colorPalette, CometChatTypography typography, CometChatAttachmentOptionSheetStyle? style) CometChatMessageComposerAction
fileAttachmentOption(BuildContext context, CometChatColorPalette colorPalette, CometChatTypography typography, CometChatAttachmentOptionSheetStyle? style) CometChatMessageComposerAction
getAIOptions(User? user, Group? group, BuildContext context, Map<String, dynamic>? id, AIOptionsStyle? aiOptionStyle) List<CometChatMessageComposerAction>
override this to alter attachment options in CometChatMessageComposer
override
getAllMessageCategories() List<String>
override this to alter default categories
override
getAllMessageTemplates() List<CometChatMessageTemplate>
override this to alter template of all type
override
getAllMessageTypes() List<String>
override this to alter default messages types
override
getAttachmentOptions(BuildContext context, Map<String, dynamic>? id, AdditionalConfigurations? additionalConfigurations) List<CometChatMessageComposerAction>
override this to alter attachment options in CometChatMessageComposer
override
getAudioMessageBubble(String? audioUrl, String? title, CometChatAudioBubbleStyle? style, MediaMessage message, BuildContext context, BubbleAlignment alignment) Widget
override this to change view inside content view of message type MessageTypeConstants.audio
override
getAudioMessageContentView(MediaMessage message, BuildContext context, BubbleAlignment alignment, {AdditionalConfigurations? additionalConfigurations}) Widget
override this to change content view for messages of type MessageTypeConstants.audio
override
getAudioMessageOptions(User loggedInUser, BaseMessage messageObject, BuildContext context, Group? group, AdditionalConfigurations? additionalConfigurations) List<CometChatMessageOption>
override this to show options for messages of type MessageTypeConstants.audio
override
getAudioMessageTemplate() CometChatMessageTemplate
override this to alter template for messages of type MessageTypeConstants.audio
override
getAuxiliaryHeaderMenu(BuildContext context, User? user, Group? group, {AdditionalConfigurations? additionalConfigurations}) Widget?
Returns the auxiliary header menu view for the user or group.
override
getAuxiliaryOptions(User? user, Group? group, BuildContext context, Map<String, dynamic>? id, Color? color, {AdditionalConfigurations? additionalConfigurations}) Widget
override this to alter default auxiliary options in CometChatMessageComposer
override
getBottomView(BaseMessage message, BuildContext context, BubbleAlignment alignment) Widget
override this to change bottom view of every type of message
override
getCardMessageBubble({CardBubbleStyle? cardBubbleStyle, required CardMessage message}) Widget
override this to change view inside content view of message type MessageTypeConstants.file
override
getCardMessageContentView(CardMessage message, BuildContext context, BubbleAlignment alignment) Widget
override this to change content view for messages of type MessageTypeConstants.form
override
getCardMessageOptions(User loggedInUser, BaseMessage messageObject, BuildContext context, Group? group, AdditionalConfigurations? additionalConfigurations) List<CometChatMessageOption>
override this to show options for messages of type MessageTypeConstants.card
override
getCardMessageTemplate() CometChatMessageTemplate
override this to alter template for messages of type MessageTypeConstants.card
override
getCommonOptions(User loggedInUser, BaseMessage messageObject, BuildContext context, Group? group, AdditionalConfigurations? additionalConfigurations) List<CometChatMessageOption>
override this to alter options for messages of every type
override
getConversationSubtitle(Conversation conversation, BuildContext context, TextStyle? subtitleStyle, Color? iconColor, {AdditionalConfigurations? additionalConfigurations}) Widget
override this to change the widget shown for subtitle in conversations
override
getCopyOption(BuildContext context, CometChatColorPalette colorPalette, CometChatTypography typography, CometChatMessageOptionSheetStyle? messageOptionSheetStyle) CometChatMessageOption
getDefaultMessageActionsTemplate() CometChatMessageTemplate
getDefaultTextFormatters() List<CometChatTextFormatter>
override this to alter template for messages of type MessageTypeConstants.text
override
getDeleteMessageBubble(BaseMessage messageObject, BuildContext context, CometChatDeletedBubbleStyle? style) Widget
override this to change view of deleted message
override
getDeleteOption(BuildContext context, CometChatColorPalette colorPalette, CometChatTypography typography, CometChatMessageOptionSheetStyle? messageOptionSheetStyle) CometChatMessageOption
getEditOption(BuildContext context, CometChatColorPalette colorPalette, CometChatTypography typography, CometChatMessageOptionSheetStyle? messageOptionSheetStyle) CometChatMessageOption
getFileMessageBubble(String? fileUrl, String? fileMimeType, String? title, int? id, CometChatFileBubbleStyle? style, MediaMessage message, BubbleAlignment alignment) Widget
override this to change view inside content view of message type MessageTypeConstants.file
override
getFileMessageContentView(MediaMessage message, BuildContext context, BubbleAlignment alignment, {AdditionalConfigurations? additionalConfigurations}) Widget
override this to change content view for messages of type MessageTypeConstants.file
override
getFileMessageOptions(User loggedInUser, BaseMessage messageObject, BuildContext context, Group? group, AdditionalConfigurations? additionalConfigurations) List<CometChatMessageOption>
override this to show options for messages of type MessageTypeConstants.file
override
getFileMessageTemplate() CometChatMessageTemplate
override this to alter template for messages of type MessageTypeConstants.file
override
getFormMessageBubble({String? title, required FormMessage message}) Widget
override this to change view inside content view of message type MessageTypeConstants.file
override
getFormMessageContentView(FormMessage message, BuildContext context, BubbleAlignment alignment) Widget
override this to change content view for messages of type MessageTypeConstants.form
override
getFormMessageOptions(User loggedInUser, BaseMessage messageObject, BuildContext context, Group? group, {AdditionalConfigurations? additionalConfigurations}) List<CometChatMessageOption>
override this to show options for messages of type MessageTypeConstants.form
override
getFormMessageTemplate() CometChatMessageTemplate
override this to alter template for messages of type MessageTypeConstants.form
override
getGroupActionBubble(BaseMessage messageObject, CometChatActionBubbleStyle? style) Widget
getGroupActionTemplate() CometChatMessageTemplate
override this to alter template for messages of category action
override
getId() String
override this to set id for different extensions, used when enabling extensions
override
getImageMessageBubble(String? imageUrl, String? placeholderImage, String? caption, CometChatImageBubbleStyle? style, MediaMessage message, dynamic onClick()?, BuildContext context) Widget
override this to change view inside content view of message type MessageTypeConstants.image
override
getImageMessageContentView(MediaMessage message, BuildContext context, BubbleAlignment alignment, {AdditionalConfigurations? additionalConfigurations}) Widget
override this to change content view for messages of type MessageTypeConstants.image
override
getImageMessageOptions(User loggedInUser, BaseMessage messageObject, BuildContext context, Group? group, AdditionalConfigurations? additionalConfigurations) List<CometChatMessageOption>
override this to show options for messages of type MessageTypeConstants.image
override
getImageMessageTemplate() CometChatMessageTemplate
override this to alter template for messages of type MessageTypeConstants.image
override
getLastConversationMessage(Conversation conversation, BuildContext context) String
override this to change last message fetched in conversations
override
getLastConversationWidget(Conversation conversation, BuildContext context, Color? iconColor) Widget
override this to change last message icon
override
getMessageInfo(BuildContext context, CometChatColorPalette colorPalette, CometChatTypography typography, CometChatMessageOptionSheetStyle? messageOptionSheetStyle) CometChatMessageOption
getMessageNotSupportedWidget(BaseMessage message, BuildContext context) Widget
getMessageOptions(User loggedInUser, BaseMessage messageObject, BuildContext context, Group? group, AdditionalConfigurations? additionalConfigurations) List<CometChatMessageOption>
override this to alter options for messages of given type in messageObject
override
getMessageTemplate({required String messageType, required String messageCategory}) CometChatMessageTemplate?
override this to get messages of different template
override
getMessageTypeToSubtitle(String messageType, BuildContext context) String
override
getReplyInThreadOption(BuildContext context, CometChatColorPalette colorPalette, CometChatTypography typography, CometChatMessageOptionSheetStyle? messageOptionSheetStyle) CometChatMessageOption
getSchedulerMessageBubble({String? title, dynamic schedulerBubbleStyle, required SchedulerMessage message}) Widget
override this to change view inside content view of message type MessageTypeConstants.scheduler
override
getSchedulerMessageContentView(SchedulerMessage message, BuildContext context, BubbleAlignment alignment) Widget
override this to change content view for messages of type MessageTypeConstants.scheduler
override
getSchedulerMessageOptions(User loggedInUser, BaseMessage messageObject, BuildContext context, Group? group, AdditionalConfigurations? additionalConfigurations) List<CometChatMessageOption>
override this to show options for messages of type MessageTypeConstants.scheduler
override
getSchedulerMessageTemplate() CometChatMessageTemplate
override this to alter template for messages of type MessageTypeConstants.scheduler
override
getSendMessagePrivately(BuildContext context, CometChatColorPalette colorPalette, CometChatTypography typography, CometChatMessageOptionSheetStyle? messageOptionSheetStyle) CometChatMessageOption
getShareOption(BuildContext context, CometChatColorPalette colorPalette, CometChatTypography typography, CometChatMessageOptionSheetStyle? messageOptionSheetStyle) CometChatMessageOption
getTextMessageBubble(String messageText, TextMessage message, BuildContext context, BubbleAlignment alignment, CometChatTextBubbleStyle? style, List<CometChatTextFormatter>? formatters) Widget
override this to change view inside content view of message type MessageTypeConstants.text
override
getTextMessageContentView(TextMessage message, BuildContext context, BubbleAlignment alignment, {AdditionalConfigurations? additionalConfigurations}) Widget
override this to change content view for messages of type MessageTypeConstants.text
override
getTextMessageOptions(User loggedInUser, BaseMessage messageObject, BuildContext context, Group? group, AdditionalConfigurations? additionalConfigurations) List<CometChatMessageOption>
override this to show options for messages of type MessageTypeConstants.text
override
getTextMessageTemplate() CometChatMessageTemplate
override this to alter template for messages of type MessageTypeConstants.text
override
getVideoMessageBubble(String? videoUrl, String? thumbnailUrl, MediaMessage message, dynamic onClick()?, BuildContext context, CometChatVideoBubbleStyle? style) Widget
override this to change view inside content view of message type MessageTypeConstants.video
override
getVideoMessageContentView(MediaMessage message, BuildContext context, BubbleAlignment alignment, {AdditionalConfigurations? additionalConfigurations}) Widget
override this to change content view for messages of type MessageTypeConstants.video
override
getVideoMessageOptions(User loggedInUser, BaseMessage messageObject, BuildContext context, Group? group, AdditionalConfigurations? additionalConfigurations) List<CometChatMessageOption>
override this to show options for messages of type MessageTypeConstants.video
override
getVideoMessageTemplate() CometChatMessageTemplate
override this to alter template for messages of type MessageTypeConstants.video
override
isSentByMe(User loggedInUser, BaseMessage message) bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
takePhotoOption(BuildContext context, CometChatColorPalette colorPalette, CometChatTypography typography, CometChatAttachmentOptionSheetStyle? style) CometChatMessageComposerAction
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited