CometChatMessageList constructor

const CometChatMessageList({
  1. Key? key,
  2. Widget? messageBubble({
    1. String alignment,
    2. bool hideFooterView,
    3. BaseMessage messageObject,
    4. Future onMessageLongPress()?,
    5. Future onReactionLongPress()?,
    6. Future onReactionTap(
      1. String? reaction
      )?,
    7. Future viewThreadReplies(
      1. String? parentMessageId
      )?,
    })?,
  3. String? errorStateText,
  4. String? emptyStateText,
  5. dynamic stateCallBack(
    1. CometChatMessageListController controller
    )?,
  6. MessagesRequestBuilder? messagesRequestBuilder,
  7. bool? hideError,
  8. WidgetBuilder? loadingStateView,
  9. WidgetBuilder? emptyStateView,
  10. WidgetBuilder? errorStateView,
  11. AvatarStyle? avatarStyle,
  12. MessageListStyle messageListStyle = const MessageListStyle(),
  13. Widget? footerView(
    1. BuildContext, {
    2. Group? group,
    3. int? parentMessageId,
    4. User? user,
    })?,
  14. Widget? headerView(
    1. BuildContext, {
    2. Group? group,
    3. int? parentMessageId,
    4. User? user,
    })?,
  15. ChatAlignment alignment = ChatAlignment.standard,
  16. Group? group,
  17. User? user,
  18. String? customSoundForMessages,
  19. String datePattern(
    1. BaseMessage message
    )?,
  20. Widget? deliveredIcon,
  21. bool? disableSoundForMessages,
  22. bool? hideTimestamp,
  23. List<CometChatMessageTemplate>? templates,
  24. String? newMessageIndicatorText,
  25. ThreadRepliesClick? onThreadRepliesClick,
  26. Widget? readIcon,
  27. bool? scrollToBottomOnNewMessages,
  28. Widget? sentIcon,
  29. bool? showAvatar = true,
  30. TimeAlignment timestampAlignment = TimeAlignment.bottom,
  31. Widget? waitIcon,
  32. String? customSoundForMessagePackage,
  33. String dateSeparatorPattern(
    1. DateTime
    )?,
  34. ScrollController? controller,
  35. OnError? onError,
  36. CometChatTheme? theme,
  37. bool? disableReceipt,
  38. bool? hideReceipt,
  39. MessageInformationConfiguration? messageInformationConfiguration,
  40. DateStyle? dateSeparatorStyle,
  41. ReactionListConfiguration? reactionListConfiguration,
  42. ReactionsConfiguration? reactionsConfiguration,
  43. bool? disableReactions = false,
  44. Widget? addReactionIcon,
  45. dynamic addReactionIconTap(
    1. BaseMessage
    )?,
  46. ReactionsStyle? reactionsStyle,
  47. List<String>? favoriteReactions,
  48. EmojiKeyboardStyle? emojiKeyboardStyle,
  49. List<CometChatTextFormatter>? textFormatters,
  50. 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");