MessageOptions constructor
const
MessageOptions({
- TextStyle? textStyle,
- EdgeInsets? padding,
- EdgeInsets? containerMargin,
- BoxDecoration? decoration,
- BoxDecoration? containerDecoration,
- Color? containerColor,
- bool showTime = true,
- TextStyle? timeTextStyle,
- String timeFormat()?,
- double? timestampSpacing,
- int maxReactions = 5,
- double reactionSize = 24.0,
- bool enableQuickReply = true,
- BubbleStyle? bubbleStyle,
- bool? showUserName = true,
- TextStyle? userNameStyle,
- bool? showCopyButton = false,
- void onCopy()?,
- Color? userTextColor,
- Color? aiTextColor,
- void onMediaTap()?,
- bool enableImageTaps = false,
- void onImageTap()?,
- Widget customBubbleBuilder()?,
- Widget? aiAvatar,
Creates an instance of MessageOptions.
Note about decorations:
- If
bubbleStyleis provided, its color settings will take precedence overdecorationandcontainerDecorationcolors. - Use
bubbleStylefor customizing bubble colors, radii, and shadows. - Use
decorationorcontainerDecorationfor more advanced decorations like gradients and images, but be aware thatbubbleStylecolors will still be applied. - To fully bypass
bubbleStyle, set it to null and only usedecorationorcontainerDecoration.
Implementation
const MessageOptions({
this.textStyle,
this.padding,
this.containerMargin,
this.decoration,
this.containerDecoration,
this.containerColor,
this.showTime = true,
this.timeTextStyle,
this.timeFormat,
this.timestampSpacing,
this.maxReactions = 5,
this.reactionSize = 24.0,
this.enableQuickReply = true,
this.bubbleStyle,
this.showUserName = true,
this.userNameStyle,
this.showCopyButton = false,
this.onCopy,
this.userTextColor,
this.aiTextColor,
this.onMediaTap,
this.enableImageTaps = false,
this.onImageTap,
this.customBubbleBuilder,
this.aiAvatar
});