Message constructor
const
Message({
- Key? 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,
- ImageProvider<
Object> imageProviderBuilder({- required Conditional conditional,
- required Map<
String, String> ? imageHeaders, - required String uri,
- required Message message,
- required int messageWidth,
- Widget nameBuilder(
- User
- 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,
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,
});