copyWith method

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

Implementation

MessageOptions copyWith({
  TextStyle? textStyle,
  EdgeInsets? padding,
  EdgeInsets? containerMargin,
  BoxDecoration? decoration,
  BoxDecoration? containerDecoration,
  Color? containerColor,
  bool? showTime,
  TextStyle? timeTextStyle,
  String Function(DateTime)? timeFormat,
  double? timestampSpacing,
  int? maxReactions,
  double? reactionSize,
  bool? enableQuickReply,
  BubbleStyle? bubbleStyle,
  bool? showUserName,
  TextStyle? userNameStyle,
  bool? showCopyButton,
  void Function(String)? onCopy,
  Color? userTextColor,
  Color? aiTextColor,
  void Function(ChatMedia)? onMediaTap,
  bool? enableImageTaps,
  void Function(String url, String? title, String? alt)? onImageTap,
  Widget Function(BuildContext, ChatMessage, bool)? customBubbleBuilder,
}) =>
    MessageOptions(
      textStyle: textStyle ?? this.textStyle,
      padding: padding ?? this.padding,
      containerMargin: containerMargin ?? this.containerMargin,
      decoration: decoration ?? this.decoration,
      containerDecoration: containerDecoration ?? this.containerDecoration,
      containerColor: containerColor ?? this.containerColor,
      showTime: showTime ?? this.showTime,
      timeTextStyle: timeTextStyle ?? this.timeTextStyle,
      timeFormat: timeFormat ?? this.timeFormat,
      timestampSpacing: timestampSpacing ?? this.timestampSpacing,
      maxReactions: maxReactions ?? this.maxReactions,
      reactionSize: reactionSize ?? this.reactionSize,
      enableQuickReply: enableQuickReply ?? this.enableQuickReply,
      bubbleStyle: bubbleStyle ?? this.bubbleStyle,
      showUserName: showUserName ?? this.showUserName,
      userNameStyle: userNameStyle ?? this.userNameStyle,
      showCopyButton: showCopyButton ?? this.showCopyButton,
      onCopy: onCopy ?? this.onCopy,
      userTextColor: userTextColor ?? this.userTextColor,
      aiTextColor: aiTextColor ?? this.aiTextColor,
      onMediaTap: onMediaTap ?? this.onMediaTap,
      enableImageTaps: enableImageTaps ?? this.enableImageTaps,
      customBubbleBuilder: customBubbleBuilder ?? this.customBubbleBuilder,
    );