MessageOptions constructor
const
MessageOptions({
- bool showCurrentUserAvatar = false,
- bool showOtherUsersAvatar = true,
- bool showOtherUsersName = true,
- Widget userNameBuilder(
- ChatUser user
- Widget avatarBuilder()?,
- dynamic onPressAvatar()?,
- dynamic onLongPressAvatar()?,
- dynamic onLongPressMessage()?,
- dynamic onPressMessage()?,
- dynamic onPressMention()?,
- Color? currentUserContainerColor,
- Color? currentUserTextColor,
- Color containerColor = const Color(0xFFF5F5F5),
- Color textColor = Colors.black,
- EdgeInsets messagePadding = const EdgeInsets.all(11),
- double? maxWidth,
- BoxDecoration messageDecorationBuilder(
- ChatMessage message,
- ChatMessage? previousMessage,
- ChatMessage? nextMessage
- Widget top(
- ChatMessage message,
- ChatMessage? previousMessage,
- ChatMessage? nextMessage
- Widget bottom(
- ChatMessage message,
- ChatMessage? previousMessage,
- ChatMessage? nextMessage
- Widget messageRowBuilder(
- ChatMessage message,
- ChatMessage? previousMessage,
- ChatMessage? nextMessage,
- bool isAfterDateSeparator,
- bool isBeforeDateSeparator,
- Widget messageTextBuilder(
- ChatMessage message,
- ChatMessage? previousMessage,
- ChatMessage? nextMessage
- List<
MatchText> ? parsePatterns, - bool textBeforeMedia = true,
- void onTapMedia(
- ChatMedia media
- bool showTime = false,
- DateFormat? timeFormat,
- Widget messageTimeBuilder(
- ChatMessage message,
- bool isOwnMessage
- Widget messageMediaBuilder(
- ChatMessage message,
- ChatMessage? previousMessage,
- ChatMessage? nextMessage
- double borderRadius = 18.0,
- Color? currentUserTimeTextColor,
- EdgeInsets marginDifferentAuthor = const EdgeInsets.only(top: 15),
- EdgeInsets marginSameAuthor = const EdgeInsets.only(top: 2),
- double spaceWhenAvatarIsHidden = 10.0,
- double timeFontSize = 10.0,
- EdgeInsets timePadding = const EdgeInsets.only(top: 5),
- Color? timeTextColor,
Implementation
const MessageOptions({
this.showCurrentUserAvatar = false,
this.showOtherUsersAvatar = true,
this.showOtherUsersName = true,
this.userNameBuilder,
this.avatarBuilder,
this.onPressAvatar,
this.onLongPressAvatar,
this.onLongPressMessage,
this.onPressMessage,
this.onPressMention,
Color? currentUserContainerColor,
Color? currentUserTextColor,
this.containerColor = const Color(0xFFF5F5F5),
this.textColor = Colors.black,
this.messagePadding = const EdgeInsets.all(11),
this.maxWidth,
this.messageDecorationBuilder,
this.top,
this.bottom,
this.messageRowBuilder,
this.messageTextBuilder,
this.parsePatterns,
this.textBeforeMedia = true,
this.onTapMedia,
this.showTime = false,
this.timeFormat,
this.messageTimeBuilder,
this.messageMediaBuilder,
this.borderRadius = 18.0,
Color? currentUserTimeTextColor,
this.marginDifferentAuthor = const EdgeInsets.only(top: 15),
this.marginSameAuthor = const EdgeInsets.only(top: 2),
this.spaceWhenAvatarIsHidden = 10.0,
this.timeFontSize = 10.0,
this.timePadding = const EdgeInsets.only(top: 5),
Color? timeTextColor,
}) : _currentUserContainerColor = currentUserContainerColor,
_currentUserTextColor = currentUserTextColor,
_currentUserTimeTextColor = currentUserTimeTextColor,
_timeTextColor = timeTextColor;