Skip to main content
View Slots let you swap out specific parts of a component — the avatar area, title, subtitle, trailing section, or the entire row — while keeping the rest of the component’s behavior intact.

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 a Widget?. Return null to fall back to the default view.

Available View Slots

List Components (Conversations, Users, Groups, Group Members)

Message List

Message Template Slots

Each CometChatMessageTemplate has its own view slots for the bubble structure:

Example: Custom Leading View on Conversations

Example: Custom Subtitle View on Conversations

Example: Custom Header View on Message List

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.
When you set bubbleView on a template, all other template slots (headerView, contentView, footerView, etc.) are ignored since the entire bubble is replaced.