AI Integration Quick Reference
AI Integration Quick Reference
The Builder Callback Pattern
Flutter UI Kit components accept nullable builder callbacks for each customizable region. Each callback receives the relevant data model and returns aWidget?. Return null to fall back to the default view.
Available View Slots
List Components (Conversations, Users, Groups, Group Members)
Message List
Message Template Slots
EachCometChatMessageTemplate has its own view slots for the bubble structure:
Example: Custom Leading View on Conversations
- Dart
Example: Custom Subtitle View on Conversations
- Dart
Example: Custom Header View on Message List
- Dart
Slot-Level vs Full Replacement
Use individual slot properties (leadingView, titleView, subtitleView, trailingView) when you want to customize one region while keeping the default layout for everything else. Use bubbleView on a CometChatMessageTemplate when you need complete control over the entire message bubble.
Related
- Message Template — Full template structure for message bubbles.
- Customization Overview — See all customization categories.