MessageListConfiguration class

MessageListConfiguration is a data class that has configuration properties to customize the functionality and appearance of CometChatMessageList can be used by a component where CometChatMessageList is a child component


MessageListConfiguration(
     messageListStyle: MessageListStyle(),
     avatarStyle: AvatarStyle(),
     templates: MessagesDataSource().getAllMessageTemplates(),
     alignment: ChatAlignment.standard
   );

Constructors

MessageListConfiguration({MessagesRequestBuilder? messagesRequestBuilder, MessageListStyle? messageListStyle, ScrollController? controller, String? emptyStateText, String? errorStateText, WidgetBuilder? loadingStateView, WidgetBuilder? emptyStateView, WidgetBuilder? errorStateView, bool? hideError, AvatarStyle? avatarStyle, bool? disableSoundForMessages, String? customSoundForMessages, String? customSoundForMessagePackage, Widget? readIcon, Widget? deliveredIcon, Widget? sentIcon, Widget? waitIcon, ChatAlignment? alignment, bool? showAvatar, String datePattern(BaseMessage message)?, bool? hideTimestamp, TimeAlignment? timestampAlignment, List<CometChatMessageTemplate>? templates, String? newMessageIndicatorText, bool? scrollToBottomOnNewMessages, ThreadRepliesClick? onThreadRepliesClick, Widget? headerView(BuildContext, {Group? group, int? parentMessageId, User? user})?, Widget? messageBubble({String alignment, bool hideFooterView, BaseMessage messageObject, Future onMessageLongPress()?, Future onReactionLongPress()?, Future onReactionTap(String? reaction)?, Future viewThreadReplies(String? parentMessageId)?})?, Widget? footerView(BuildContext, {Group? group, int? parentMessageId, User? user})?, String dateSeparatorPattern(DateTime)?, OnError? onError, CometChatTheme? theme, bool? disableReceipt, bool? hideReceipt, MessageInformationConfiguration? messageInformationConfiguration, DateStyle? dateSeparatorStyle, ReactionListConfiguration? reactionListConfiguration, bool? disableReactions, List<String>? favoriteReactions, ReactionsStyle? reactionsStyle, Widget? addReactionIcon, dynamic addReactionIconTap(BaseMessage)?, EmojiKeyboardStyle? emojiKeyboardStyle, List<CometChatTextFormatter>? textFormatters, bool? disableMentions, ReactionsConfiguration? reactionsConfiguration})
const

Properties

addReactionIcon Widget?
addReactionIcon sets custom icon for adding reaction
final
addReactionIconTap → dynamic Function(BaseMessage)?
addReactionIconTap sets custom onTap for adding reaction
final
alignment ChatAlignment?
used to set the alignment of messages in CometChatMessageList. It can be either "leftAligned" or "standard"
final
avatarStyle AvatarStyle?
avatarStyle set style for avatar visible in leading view of message bubble
final
controller ScrollController?
controller sets controller for the list
final
customSoundForMessagePackage String?
if sending sound url from other package pass package name here
final
customSoundForMessages String?
asset url to Sound
final
datePattern String Function(BaseMessage message)?
datePattern custom date pattern visible in receipts
final
dateSeparatorPattern String Function(DateTime)?
dateSeparatorPattern pattern for date separator
final
dateSeparatorStyle DateStyle?
dateSeparatorStyle sets style for date separator
final
deliveredIcon Widget?
custom message delivered icon
final
disableMentions bool?
disableMentions disables formatting of mentions in the subtitle of the conversation
final
disableReactions bool?
disableReactions toggle visibility of reactions
final
disableReceipt bool?
disableReceipt controls visibility of read receipts
final
disableSoundForMessages bool?
final
emojiKeyboardStyle EmojiKeyboardStyle?
emojiKeyboardStyle is a parameter used to set the style for the emoji keyboard
final
emptyStateText String?
emptyStateText text to be displayed when the list is empty
final
emptyStateView WidgetBuilder?
emptyStateView returns view fow empty state
final
errorStateText String?
errorStateText text to be displayed when error occur
final
errorStateView WidgetBuilder?
errorStateView returns view fow error state behind the dialog
final
favoriteReactions List<String>?
favoriteReactions is a list of frequently used reactions
final
footerView Widget? Function(BuildContext, {Group? group, int? parentMessageId, User? user})?
footerView sets custom widget to footer
final
hashCode int
The hash code for this object.
no setterinherited
headerView Widget? Function(BuildContext, {Group? group, int? parentMessageId, User? user})?
footerView sets custom widget to footer
final
hideError bool?
hideError toggle visibility of error dialog
final
hideReceipt bool?
disableReceipt controls visibility of read receipts
final
hideTimestamp bool?
hideTimestamp set style for avatar
final
loadingStateView WidgetBuilder?
loadingStateView returns view fow loading state
final
messageBubble Widget? Function({String alignment, bool hideFooterView, BaseMessage messageObject, Future onMessageLongPress()?, Future onReactionLongPress()?, Future onReactionTap(String? reaction)?, Future viewThreadReplies(String? parentMessageId)?})?
final
messageInformationConfiguration MessageInformationConfiguration?
messageInformationConfiguration set configuration for message Information
final
messageListStyle MessageListStyle?
messageListStyle sets style
final
messagesRequestBuilder MessagesRequestBuilder?
messagesRequestBuilder custom request builder for fetching messages
final
newMessageIndicatorText String?
newMessageIndicatorText set style for avatar
final
onError OnError?
onError callback triggered in case any error happens when fetching users
final
onThreadRepliesClick ThreadRepliesClick?
call back for click on thread indicator
final
reactionListConfiguration ReactionListConfiguration?
reactionListConfiguration sets configuration properties for reaction list
final
reactionsConfiguration ReactionsConfiguration?
reactionsConfiguration sets configuration properties for reactions
final
reactionsStyle ReactionsStyle?
reactionsStyle is a parameter used to set the style for the reactions
final
readIcon Widget?
custom read icon visible at read receipt
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollToBottomOnNewMessages bool?
Should scroll to bottom on new message?, by default false
final
sentIcon Widget?
custom sent icon visible at read receipt
final
showAvatar bool?
toggle visibility for avatar
final
templates List<CometChatMessageTemplate>?
templates set message type allowed
final
textFormatters List<CometChatTextFormatter>?
textFormatters is a list of text formatters for message bubbles with type text
final
theme CometChatTheme?
theme sets custom theme
final
timestampAlignment TimeAlignment?
timestampAlignment set style for avatar
final
waitIcon Widget?
custom wait icon visible at read receipt
final

Methods

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