copyWith method
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,
创建一个新的配置,覆盖当前配置的某些属性
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,
);
}