TextModerationExtensionDecorator class

TextModerationExtensionDecorator is a the view model for TextModerationExtension it contains all the relevant business logic it is also a sub-class of DataSourceDecorator which allows any extension to override the default methods provided by MessagesDataSource

Inheritance

Constructors

TextModerationExtensionDecorator(DataSource dataSource, {TextModerationConfiguration? configuration})

Properties

configuration TextModerationConfiguration?
getter/setter pair
dataSource DataSource
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getAIOptions(User? user, Group? group, CometChatTheme theme, BuildContext context, Map<String, dynamic>? id, AIOptionsStyle? aiOptionStyle) List<CometChatMessageComposerAction>
override this to alter attachment options in CometChatMessageComposer
inherited
getAllMessageCategories() List<String>
override this to alter default categories
inherited
getAllMessageTemplates({CometChatTheme? theme}) List<CometChatMessageTemplate>
override this to alter template of all type
inherited
getAllMessageTypes() List<String>
override this to alter default messages types
inherited
getAttachmentOptions(CometChatTheme theme, BuildContext context, Map<String, dynamic>? id) List<CometChatMessageComposerAction>
override this to alter attachment options in CometChatMessageComposer
inherited
getAudioMessageBubble(String? audioUrl, String? title, AudioBubbleStyle? style, MediaMessage message, BuildContext context, CometChatTheme theme) Widget
override this to change view inside content view of message type MessageTypeConstants.audio
inherited
getAudioMessageContentView(MediaMessage message, BuildContext context, BubbleAlignment alignment, CometChatTheme theme) Widget
override this to change content view for messages of type MessageTypeConstants.audio
inherited
getAudioMessageOptions(User loggedInUser, BaseMessage messageObject, BuildContext context, Group? group) List<CometChatMessageOption>
override this to show options for messages of type MessageTypeConstants.audio
inherited
getAudioMessageTemplate(CometChatTheme theme) CometChatMessageTemplate
override this to alter template for messages of type MessageTypeConstants.audio
inherited
getAuxiliaryHeaderMenu(BuildContext context, User? user, Group? group, CometChatTheme? theme) Widget?
Returns the auxiliary header menu view for the user or group.
inherited
getAuxiliaryOptions(User? user, Group? group, BuildContext context, Map<String, dynamic>? id, CometChatTheme? theme) Widget
override this to alter default auxiliary options in CometChatMessageComposer
inherited
getBottomView(BaseMessage message, BuildContext context, BubbleAlignment alignment) Widget
override this to change bottom view of every type of message
inherited
getCardMessageBubble({CardBubbleStyle? cardBubbleStyle, required CardMessage message, required CometChatTheme theme}) Widget
override this to change view inside content view of message type MessageTypeConstants.file
inherited
getCardMessageContentView(CardMessage message, BuildContext context, BubbleAlignment alignment, CometChatTheme theme) Widget
override this to change content view for messages of type MessageTypeConstants.form
inherited
getCardMessageOptions(User loggedInUser, BaseMessage messageObject, BuildContext context, Group? group) List<CometChatMessageOption>
override this to show options for messages of type MessageTypeConstants.card
inherited
getCardMessageTemplate(CometChatTheme theme) CometChatMessageTemplate
override this to alter template for messages of type MessageTypeConstants.card
inherited
getCommonOptions(User loggedInUser, BaseMessage messageObject, BuildContext context, Group? group) List<CometChatMessageOption>
override this to alter options for messages of every type
inherited
getContentText(TextMessage message) String
getConversationSubtitle(Conversation conversation, BuildContext context, CometChatTheme theme, TextStyle? subtitleStyle, {AdditionalConfigurations? additionalConfigurations}) Widget
override this to change the widget shown for subtitle in conversations
inherited
getDefaultTextFormatters() List<CometChatTextFormatter>
override this to alter template for messages of type MessageTypeConstants.text
inherited
getDeleteMessageBubble(BaseMessage messageObject, CometChatTheme theme) Widget
override this to change view of deleted message
inherited
getFileMessageBubble(String? fileUrl, String? fileMimeType, String? title, int? id, FileBubbleStyle? style, MediaMessage message, CometChatTheme theme) Widget
override this to change view inside content view of message type MessageTypeConstants.file
inherited
getFileMessageContentView(MediaMessage message, BuildContext context, BubbleAlignment alignment, CometChatTheme theme) Widget
override this to change content view for messages of type MessageTypeConstants.file
inherited
getFileMessageOptions(User loggedInUser, BaseMessage messageObject, BuildContext context, Group? group) List<CometChatMessageOption>
override this to show options for messages of type MessageTypeConstants.file
inherited
getFileMessageTemplate(CometChatTheme theme) CometChatMessageTemplate
override this to alter template for messages of type MessageTypeConstants.file
inherited
getFormMessageBubble({String? title, FormBubbleStyle? formBubbleStyle, required FormMessage message, required CometChatTheme theme}) Widget
override this to change view inside content view of message type MessageTypeConstants.file
inherited
getFormMessageContentView(FormMessage message, BuildContext context, BubbleAlignment alignment, CometChatTheme theme) Widget
override this to change content view for messages of type MessageTypeConstants.form
inherited
getFormMessageOptions(User loggedInUser, BaseMessage messageObject, BuildContext context, Group? group) List<CometChatMessageOption>
override this to show options for messages of type MessageTypeConstants.form
inherited
getFormMessageTemplate(CometChatTheme theme) CometChatMessageTemplate
override this to alter template for messages of type MessageTypeConstants.form
inherited
getGroupActionTemplate(CometChatTheme theme) CometChatMessageTemplate
override this to alter template for messages of category action
inherited
getId() String
override this to set id for different extensions, used when enabling extensions
override
getImageMessageBubble(String? imageUrl, String? placeholderImage, String? caption, ImageBubbleStyle? style, MediaMessage message, dynamic onClick()?, BuildContext context, CometChatTheme theme) Widget
override this to change view inside content view of message type MessageTypeConstants.image
inherited
getImageMessageContentView(MediaMessage message, BuildContext context, BubbleAlignment alignment, CometChatTheme theme) Widget
override this to change content view for messages of type MessageTypeConstants.image
inherited
getImageMessageOptions(User loggedInUser, BaseMessage messageObject, BuildContext context, Group? group) List<CometChatMessageOption>
override this to show options for messages of type MessageTypeConstants.image
inherited
getImageMessageTemplate(CometChatTheme theme) CometChatMessageTemplate
override this to alter template for messages of type MessageTypeConstants.image
inherited
getLastConversationMessage(Conversation conversation, BuildContext context) String
override this to change last message fetched in conversations
override
getMessageOptions(User loggedInUser, BaseMessage messageObject, BuildContext context, Group? group) List<CometChatMessageOption>
override this to alter options for messages of given type in messageObject
inherited
getMessageTemplate({required String messageType, required String messageCategory, CometChatTheme? theme}) CometChatMessageTemplate?
override this to get messages of different template
inherited
getMessageTypeToSubtitle(String messageType, BuildContext context) String
inherited
getSchedulerMessageBubble({SchedulerBubbleStyle? schedulerBubbleStyle, required SchedulerMessage message, required CometChatTheme theme}) Widget
override this to change view inside content view of message type MessageTypeConstants.scheduler
inherited
getSchedulerMessageContentView(SchedulerMessage message, BuildContext context, BubbleAlignment alignment, CometChatTheme theme) Widget
override this to change content view for messages of type MessageTypeConstants.scheduler
inherited
getSchedulerMessageOptions(User loggedInUser, BaseMessage messageObject, BuildContext context, Group? group) List<CometChatMessageOption>
override this to show options for messages of type MessageTypeConstants.scheduler
inherited
getSchedulerMessageTemplate(CometChatTheme theme) CometChatMessageTemplate
override this to alter template for messages of type MessageTypeConstants.scheduler
inherited
getTextMessageBubble(String messageText, TextMessage message, BuildContext context, BubbleAlignment alignment, CometChatTheme theme, TextBubbleStyle? style, {AdditionalConfigurations? additionalConfigurations}) Widget
override this to change view inside content view of message type MessageTypeConstants.text
override
getTextMessageContentView(TextMessage message, BuildContext context, BubbleAlignment alignment, CometChatTheme theme, {AdditionalConfigurations? additionalConfigurations}) Widget
override this to change content view for messages of type MessageTypeConstants.text
inherited
getTextMessageOptions(User loggedInUser, BaseMessage messageObject, BuildContext context, Group? group) List<CometChatMessageOption>
override this to show options for messages of type MessageTypeConstants.text
inherited
getTextMessageTemplate(CometChatTheme theme) CometChatMessageTemplate
override this to alter template for messages of type MessageTypeConstants.text
inherited
getVideoMessageBubble(String? videoUrl, String? thumbnailUrl, MediaMessage message, dynamic onClick()?, BuildContext context, CometChatTheme theme, VideoBubbleStyle? style) Widget
override this to change view inside content view of message type MessageTypeConstants.video
inherited
getVideoMessageContentView(MediaMessage message, BuildContext context, BubbleAlignment alignment, CometChatTheme theme) Widget
override this to change content view for messages of type MessageTypeConstants.video
inherited
getVideoMessageOptions(User loggedInUser, BaseMessage messageObject, BuildContext context, Group? group) List<CometChatMessageOption>
override this to show options for messages of type MessageTypeConstants.video
inherited
getVideoMessageTemplate(CometChatTheme theme) CometChatMessageTemplate
override this to alter template for messages of type MessageTypeConstants.video
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

checkDataMasking(BaseMessage baseMessage) String
checkProfanityMessage(BaseMessage baseMessage) String