CometChatMessageList constructor

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

Implementation

const CometChatMessageList({
  super.key,
  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 = false,
  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");