聊天页面(Config 部分自定义 UI)
聊天页面通过 RCKChatPageConfig
进行部分自定义 UI,覆盖 AppBar、消息气泡、聊天背景、输入区与默认返回按钮等。以下列出所有配置项与其子配置字段说明,并提供使用示例。
入口组件
- 组件:
RCKChatPage
- 配置:
RCKChatPageConfig
总览:RCKChatPageConfig(聊天页面整体配置)
appBarConfig
(RCKChatAppBarConfig
):顶部导航栏配置bubbleConfig
(RCKBubbleConfig?
):消息气泡样式(文本/图片/语音/视频/文件等子样式)backgroundConfig
(RCKChatBackgroundConfig
):聊天背景(颜色/图片/适配模式/重复)inputConfig
(RCKMessageInputConfig?
):输入区域配置(按钮、表情、扩展菜单等)useDefaultAppBarLeading
(bool
):是否使用默认返回按钮与未读角标行为
AppBar 配置(RCKChatAppBarConfig 及子项)
height
(double
):AppBar 高度(默认 56)padding
(EdgeInsets
):内边距centerTitle
(bool
):标题是否居中(默认 true)automaticallyImplyLeading
(bool
):是否自动添加返回按钮(默认 true)backgroundConfig
(RCKBackgroundConfig
):背景(颜色/图片/渐变/边框/圆角/阴影)leadingConfig
(RCKLeadingConfig
):左侧区域(图标、文本、文本样式、间距、内边距)titleConfig
(RCKChatTitleConfig
):标题文本/样式、前后缀图标、间距、对齐、内边距actionsConfig
(RCKActionsConfig
):右侧操作按钮列表、间距、内边距
RCKBackgroundConfig
字段:color
、image
(DecorationImage