RCKBubbleConfig class

消息气泡配置

Available extensions

Constructors

RCKBubbleConfig({BubbleShape shape = BubbleShape.roundedRectangle, double borderRadius = kBubbleBorderRadius, Color? senderColor, Color? receiverColor, Color systemColor = const Color(0xFFE0E0E0), Color? fileColor, Map<RCIMIWMessageType, Color>? messageTypeColors, Map<RCIMIWMessageType, Alignment>? messageTypeAlignments, Color? borderColor, double? borderWidth, BorderStyle? borderStyle, EdgeInsetsGeometry padding = const EdgeInsets.all(10.0), RCKTextStyleConfig? textStyleConfig, RCKLinkStyleConfig? linkStyleConfig, RCKImageStyleConfig imageStyleConfig = const RCKImageStyleConfig(), RCKVoiceStyleConfig voiceStyleConfig = const RCKVoiceStyleConfig(), RCKSightStyleConfig sightStyleConfig = const RCKSightStyleConfig(), RCKFileStyleConfig? fileStyleConfig, RCKReferenceStyleConfig referenceStyleConfig = const RCKReferenceStyleConfig(), RCKAppendBubbleConfig appendBubbleConfig = const RCKAppendBubbleConfig()})

Properties

appendBubbleConfig → RCKAppendBubbleConfig
追加气泡样式配置(控制主气泡下方的附加面板样式)
final
borderColor → Color?
边框颜色
final
borderRadius → double
圆角大小 (当形状为roundedRectangle时有效)
final
borderStyle → BorderStyle?
边框样式
final
borderWidth → double?
边框宽度
final
fileColor → Color?
文件消息颜色
final
fileStyleConfig → RCKFileStyleConfig
文件样式配置
final
hashCode → int
The hash code for this object.
no setterinherited
imageStyleConfig → RCKImageStyleConfig
图片样式配置
final
linkStyleConfig → RCKLinkStyleConfig
链接样式配置
final
messageTypeAlignments → Map<RCIMIWMessageType, Alignment>?
根据消息类型自定义对齐方式,优先级高于默认对齐(未知/撤回居中,其余按消息方向左右对齐)。 配置为 Alignment.center 的消息类型默认不展示发送者昵称与头像, 仍可通过气泡的 withoutName 参数覆盖。
final
messageTypeColors → Map<RCIMIWMessageType, Color>?
根据消息类型自定义颜色
final
padding → EdgeInsetsGeometry
气泡内边距
final
receiverColor → Color
no setter
referenceStyleConfig → RCKReferenceStyleConfig
引用消息样式配置
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
senderColor → Color
no setter
shape → BubbleShape
形状相关
final
sightStyleConfig → RCKSightStyleConfig
视频样式配置
final
systemColor → Color
系统消息颜色
final
textStyleConfig → RCKTextStyleConfig
文本样式配置
final
voiceStyleConfig → RCKVoiceStyleConfig
语音样式配置
final

Methods

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}) → RCKBubbleConfig
创建一个新的配置,覆盖当前配置的某些属性
getBubbleColor(RCIMIWMessage message) → Color

Available on RCKBubbleConfig, provided by the BubbleConfigExtension extension

getBubbleDecoration(RCIMIWMessage message, bool withoutBubble) → BoxDecoration
获取气泡装饰
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited