CometChatMessageList constructor
const
CometChatMessageList({
- Key? key,
- Widget? messageBubble({})?,
- String? errorStateText,
- String? emptyStateText,
- dynamic stateCallBack(
- CometChatMessageListController controller
- MessagesRequestBuilder? messagesRequestBuilder,
- bool? hideError,
- WidgetBuilder? loadingStateView,
- WidgetBuilder? emptyStateView,
- WidgetBuilder? errorStateView,
- AvatarStyle? avatarStyle,
- MessageListStyle messageListStyle = const MessageListStyle(),
- Widget? headerView(
- BuildContext, {
- Group? group,
- int? parentMessageId,
- User? user,
- ChatAlignment alignment = ChatAlignment.standard,
- Group? group,
- User? user,
- String? customSoundForMessages,
- String datePattern(
- BaseMessage message
- Widget? deliveredIcon,
- bool? disableSoundForMessages,
- bool? hideTimestamp,
- List<
CometChatMessageTemplate> ? templates, - String? newMessageIndicatorText,
- ThreadRepliesClick? onThreadRepliesClick,
- Widget? readIcon,
- bool? scrollToBottomOnNewMessages,
- Widget? sentIcon,
- bool? showAvatar = true,
- TimeAlignment timestampAlignment = TimeAlignment.bottom,
- Widget? waitIcon,
- String? customSoundForMessagePackage,
- String dateSeparatorPattern()?,
- ScrollController? controller,
- OnError? onError,
- CometChatTheme? theme,
- bool? disableReceipt,
- bool? hideReceipt,
- MessageInformationConfiguration? messageInformationConfiguration,
- DateStyle? dateSeparatorStyle,
- ReactionListConfiguration? reactionListConfiguration,
- ReactionsConfiguration? reactionsConfiguration,
- bool? disableReactions = false,
- Widget? addReactionIcon,
- dynamic addReactionIconTap()?,
- ReactionsStyle? reactionsStyle,
- List<
String> ? favoriteReactions, - EmojiKeyboardStyle? emojiKeyboardStyle,
- List<
CometChatTextFormatter> ? textFormatters, - bool? disableMentions,
Implementation
const CometChatMessageList({
super.key,
this.messageBubble,
this.errorStateText,
this.emptyStateText,
this.stateCallBack,
this.messagesRequestBuilder,
this.hideError,
this.loadingStateView,
this.emptyStateView,
this.errorStateView,
this.avatarStyle,
this.messageListStyle = const MessageListStyle(),
this.footerView,
this.headerView,
this.alignment = ChatAlignment.standard,
this.group,
this.user,
this.customSoundForMessages,
this.datePattern,
this.deliveredIcon,
this.disableSoundForMessages,
this.hideTimestamp,
this.templates,
this.newMessageIndicatorText,
this.onThreadRepliesClick,
this.readIcon,
this.scrollToBottomOnNewMessages,
this.sentIcon,
this.showAvatar = true,
this.timestampAlignment = TimeAlignment.bottom,
this.waitIcon,
this.customSoundForMessagePackage,
this.dateSeparatorPattern,
this.controller,
this.onError,
this.theme,
this.disableReceipt,
this.hideReceipt,
this.messageInformationConfiguration,
this.dateSeparatorStyle,
this.reactionListConfiguration,
this.reactionsConfiguration,
this.disableReactions = false,
this.addReactionIcon,
this.addReactionIconTap,
this.reactionsStyle,
this.favoriteReactions,
this.emojiKeyboardStyle,
this.textFormatters,
this.disableMentions,
}) : assert(user != null || group != null,
"One of user or group should be passed"),
assert(user == null || group == null,
"Only one of user or group should be passed");