Message constructor
const
Message({
- dynamic key,
- Widget audioMessageBuilder(
- AudioMessage, {
- required int messageWidth,
- Widget avatarBuilder(
- String userId
- Widget bubbleBuilder(})?,
- BubbleRtlAlignment? bubbleRtlAlignment,
- Widget customMessageBuilder(
- CustomMessage, {
- required int messageWidth,
- Widget customStatusBuilder(
- Message message, {
- required BuildContext context,
- required EmojiEnlargementBehavior emojiEnlargementBehavior,
- Widget fileMessageBuilder(
- FileMessage, {
- required int messageWidth,
- required bool hideBackgroundOnEmojiMessages,
- Map<
String, String> ? imageHeaders, - Widget imageMessageBuilder(
- ImageMessage, {
- required int messageWidth,
- required Message message,
- required int messageWidth,
- Widget nameBuilder(
- String userId
- void onAvatarTap(
- User
- void onMessageDoubleTap(
- BuildContext context,
- Message
- void onMessageLongPress(
- BuildContext context,
- Message
- void onMessageStatusLongPress(
- BuildContext context,
- Message
- void onMessageStatusTap(
- BuildContext context,
- Message
- void onMessageTap(
- BuildContext context,
- Message
- void onMessageVisibilityChanged(
- Message,
- bool visible
- void onPreviewDataFetched(
- TextMessage,
- PreviewData
- required bool roundBorder,
- required bool showAvatar,
- required bool showName,
- required bool showStatus,
- required bool showUserAvatars,
- Widget textMessageBuilder(})?,
- required TextMessageOptions textMessageOptions,
- required bool usePreviewData,
- String? userAgent,
- Widget videoMessageBuilder(
- VideoMessage, {
- required int messageWidth,
- dynamic callBackCallAgain(
- 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);