MessageOptions constructor

const MessageOptions({
  1. TextStyle? textStyle,
  2. EdgeInsets? padding,
  3. EdgeInsets? containerMargin,
  4. BoxDecoration? decoration,
  5. BoxDecoration? containerDecoration,
  6. Color? containerColor,
  7. bool showTime = true,
  8. TextStyle? timeTextStyle,
  9. String timeFormat(
    1. DateTime
    )?,
  10. double? timestampSpacing,
  11. int maxReactions = 5,
  12. double reactionSize = 24.0,
  13. bool enableQuickReply = true,
  14. BubbleStyle? bubbleStyle,
  15. bool? showUserName = true,
  16. TextStyle? userNameStyle,
  17. bool? showCopyButton = false,
  18. void onCopy(
    1. String
    )?,
  19. Color? userTextColor,
  20. Color? aiTextColor,
  21. void onMediaTap(
    1. ChatMedia
    )?,
  22. bool enableImageTaps = false,
  23. void onImageTap(
    1. String url,
    2. String? title,
    3. String? alt
    )?,
  24. Widget customBubbleBuilder(
    1. BuildContext,
    2. ChatMessage,
    3. bool
    )?,
  25. Widget? aiAvatar,
})

Creates an instance of MessageOptions.

Note about decorations:

  • If bubbleStyle is provided, its color settings will take precedence over decoration and containerDecoration colors.
  • Use bubbleStyle for customizing bubble colors, radii, and shadows.
  • Use decoration or containerDecoration for more advanced decorations like gradients and images, but be aware that bubbleStyle colors will still be applied.
  • To fully bypass bubbleStyle, set it to null and only use decoration or containerDecoration.

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
});