Message constructor

const Message({
  1. dynamic key,
  2. Widget audioMessageBuilder(
    1. AudioMessage, {
    2. required int messageWidth,
    })?,
  3. Widget avatarBuilder(
    1. String userId
    )?,
  4. Widget bubbleBuilder(
    1. Widget child, {
    2. required Message message,
    3. required bool nextMessageInGroup,
    })?,
  5. BubbleRtlAlignment? bubbleRtlAlignment,
  6. Widget customMessageBuilder(
    1. CustomMessage, {
    2. required int messageWidth,
    })?,
  7. Widget customStatusBuilder(
    1. Message message, {
    2. required BuildContext context,
    })?,
  8. required EmojiEnlargementBehavior emojiEnlargementBehavior,
  9. Widget fileMessageBuilder(
    1. FileMessage, {
    2. required int messageWidth,
    })?,
  10. required bool hideBackgroundOnEmojiMessages,
  11. Map<String, String>? imageHeaders,
  12. Widget imageMessageBuilder(
    1. ImageMessage, {
    2. required int messageWidth,
    })?,
  13. required Message message,
  14. required int messageWidth,
  15. Widget nameBuilder(
    1. String userId
    )?,
  16. void onAvatarTap(
    1. User
    )?,
  17. void onMessageDoubleTap(
    1. BuildContext context,
    2. Message
    )?,
  18. void onMessageLongPress(
    1. BuildContext context,
    2. Message
    )?,
  19. void onMessageStatusLongPress(
    1. BuildContext context,
    2. Message
    )?,
  20. void onMessageStatusTap(
    1. BuildContext context,
    2. Message
    )?,
  21. void onMessageTap(
    1. BuildContext context,
    2. Message
    )?,
  22. void onMessageVisibilityChanged(
    1. Message,
    2. bool visible
    )?,
  23. void onPreviewDataFetched(
    1. TextMessage,
    2. PreviewData
    )?,
  24. required bool roundBorder,
  25. required bool showAvatar,
  26. required bool showName,
  27. required bool showStatus,
  28. required bool showUserAvatars,
  29. Widget textMessageBuilder(
    1. TextMessage, {
    2. required int messageWidth,
    3. required bool showName,
    })?,
  30. required TextMessageOptions textMessageOptions,
  31. required bool usePreviewData,
  32. String? userAgent,
  33. Widget videoMessageBuilder(
    1. VideoMessage, {
    2. required int messageWidth,
    })?,
  34. dynamic callBackCallAgain(
    1. bool? isVideo
    )?,
})

Creates a particular message from any message type.

Implementation

const Message({
  key,
  this.audioMessageBuilder,
  this.avatarBuilder,
  this.bubbleBuilder,
  this.bubbleRtlAlignment,
  this.customMessageBuilder,
  this.customStatusBuilder,
  required this.emojiEnlargementBehavior,
  this.fileMessageBuilder,
  required this.hideBackgroundOnEmojiMessages,
  this.imageHeaders,
  this.imageMessageBuilder,
  required this.message,
  required this.messageWidth,
  this.nameBuilder,
  this.onAvatarTap,
  this.onMessageDoubleTap,
  this.onMessageLongPress,
  this.onMessageStatusLongPress,
  this.onMessageStatusTap,
  this.onMessageTap,
  this.onMessageVisibilityChanged,
  this.onPreviewDataFetched,
  required this.roundBorder,
  required this.showAvatar,
  required this.showName,
  required this.showStatus,
  required this.showUserAvatars,
  this.textMessageBuilder,
  required this.textMessageOptions,
  required this.usePreviewData,
  this.userAgent,
  this.videoMessageBuilder,
  this.callBackCallAgain,
}): super(key: key);