Message constructor

const Message({
  1. Key? 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. ImageProvider<Object> imageProviderBuilder({
    1. required Conditional conditional,
    2. required Map<String, String>? imageHeaders,
    3. required String uri,
    })?,
  14. required Message message,
  15. required int messageWidth,
  16. Widget nameBuilder(
    1. User
    )?,
  17. void onAvatarTap(
    1. User
    )?,
  18. void onMessageDoubleTap(
    1. BuildContext context,
    2. Message
    )?,
  19. void onMessageLongPress(
    1. BuildContext context,
    2. Message
    )?,
  20. void onMessageStatusLongPress(
    1. BuildContext context,
    2. Message
    )?,
  21. void onMessageStatusTap(
    1. BuildContext context,
    2. Message
    )?,
  22. void onMessageTap(
    1. BuildContext context,
    2. Message
    )?,
  23. void onMessageVisibilityChanged(
    1. Message,
    2. bool visible
    )?,
  24. void onPreviewDataFetched(
    1. TextMessage,
    2. PreviewData
    )?,
  25. required bool roundBorder,
  26. required bool showAvatar,
  27. required bool showName,
  28. required bool showStatus,
  29. required bool showUserAvatars,
  30. Widget textMessageBuilder(
    1. TextMessage, {
    2. required int messageWidth,
    3. required bool showName,
    })?,
  31. required TextMessageOptions textMessageOptions,
  32. required bool usePreviewData,
  33. String? userAgent,
  34. Widget videoMessageBuilder(
    1. VideoMessage, {
    2. required int messageWidth,
    })?,
})

Creates a particular message from any message type.

Implementation

const Message({
  super.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,
  this.imageProviderBuilder,
  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,
});