copyWith method

RCKBubbleConfig copyWith({
  1. BubbleShape? shape,
  2. Color? senderBubbleColor,
  3. Color? receiverBubbleColor,
  4. Color? systemColor,
  5. Color? fileColor,
  6. Map<RCIMIWMessageType, Color>? messageTypeColors,
  7. Map<RCIMIWMessageType, Alignment>? messageTypeAlignments,
  8. Color? borderColor,
  9. double? borderWidth,
  10. BorderStyle? borderStyle,
  11. EdgeInsetsGeometry? padding,
  12. double? borderRadius,
  13. RCKTextStyleConfig? textStyleConfig,
  14. RCKLinkStyleConfig? linkStyleConfig,
  15. RCKImageStyleConfig? imageStyleConfig,
  16. RCKVoiceStyleConfig? voiceStyleConfig,
  17. RCKSightStyleConfig? sightStyleConfig,
  18. RCKFileStyleConfig? fileStyleConfig,
  19. RCKReferenceStyleConfig? referenceStyleConfig,
  20. RCKAppendBubbleConfig? appendBubbleConfig,
})

创建一个新的配置,覆盖当前配置的某些属性

Implementation

RCKBubbleConfig copyWith({
  BubbleShape? shape,
  Color? senderBubbleColor,
  Color? receiverBubbleColor,
  Color? systemColor,
  Color? fileColor,
  Map<RCIMIWMessageType, Color>? messageTypeColors,
  Map<RCIMIWMessageType, Alignment>? messageTypeAlignments,
  Color? borderColor,
  double? borderWidth,
  BorderStyle? borderStyle,
  EdgeInsetsGeometry? padding,
  double? borderRadius,
  RCKTextStyleConfig? textStyleConfig,
  RCKLinkStyleConfig? linkStyleConfig,
  RCKImageStyleConfig? imageStyleConfig,
  RCKVoiceStyleConfig? voiceStyleConfig,
  RCKSightStyleConfig? sightStyleConfig,
  RCKFileStyleConfig? fileStyleConfig,
  RCKReferenceStyleConfig? referenceStyleConfig,
  RCKAppendBubbleConfig? appendBubbleConfig,
}) {
  return RCKBubbleConfig(
    shape: shape ?? this.shape,
    senderColor: senderBubbleColor ?? _senderColor,
    receiverColor: receiverBubbleColor ?? _receiverColor,
    systemColor: systemColor ?? this.systemColor,
    fileColor: fileColor ?? this.fileColor,
    messageTypeColors: messageTypeColors ?? this.messageTypeColors,
    messageTypeAlignments:
        messageTypeAlignments ?? this.messageTypeAlignments,
    borderColor: borderColor ?? this.borderColor,
    borderWidth: borderWidth ?? this.borderWidth,
    borderStyle: borderStyle ?? this.borderStyle,
    padding: padding ?? this.padding,
    borderRadius: borderRadius ?? this.borderRadius,
    textStyleConfig: textStyleConfig ?? this.textStyleConfig,
    linkStyleConfig: linkStyleConfig ?? this.linkStyleConfig,
    imageStyleConfig: imageStyleConfig ?? this.imageStyleConfig,
    voiceStyleConfig: voiceStyleConfig ?? this.voiceStyleConfig,
    sightStyleConfig: sightStyleConfig ?? this.sightStyleConfig,
    fileStyleConfig: fileStyleConfig ?? this.fileStyleConfig,
    referenceStyleConfig: referenceStyleConfig ?? this.referenceStyleConfig,
    appendBubbleConfig: appendBubbleConfig ?? this.appendBubbleConfig,
  );
}