
Cometchat Flutter V5 Customization
- 4 installs
- 70 repo stars
- Updated June 23, 2026
- cometchat/cometchat-skills
Customize CometChat Flutter UIKit v5 beyond props using slot views, message templates, DataSource decorators, and text formatters.
About
Presents four tiers of CometChat Flutter UIKit v5 customization from props to DataSource decorators. A developer uses it when default props can't achieve the desired bubble, template, or slot behavior.
- Four-tier model: props, slot views, templates/datasource, formatters
- Slot-view callbacks replace specific UI sections like subtitles
Cometchat Flutter V5 Customization by the numbers
- 4 all-time installs (skills.sh)
- Ranked #874 of 1,039 Mobile Development skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/cometchat/cometchat-skills --skill cometchat-flutter-v5-customizationAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 4 |
|---|---|
| repo stars | ★ 70 |
| Last updated | June 23, 2026 |
| Repository | cometchat/cometchat-skills ↗ |
What it does
Customize CometChat Flutter UIKit v5 beyond props using slot views, message templates, DataSource decorators, and text formatters.
Files
CometChat Flutter UIKit v5 — Customization
Four tiers of customization, from simple to deep.
Tier 1: Props
Pass props directly to components:
CometChatMessageList(
user: user,
hideEditMessageOption: true,
hideReactionOption: true,
receiptsVisibility: false,
)Tier 2: Slot Views
Replace specific UI sections via callback props:
CometChatConversations(
subtitleView: (context, conversation) {
final lastMessage = conversation.lastMessage;
if (lastMessage is TextMessage) {
return Text(lastMessage.text, maxLines: 1, overflow: TextOverflow.ellipsis);
}
return null; // Falls back to default
},
trailingView: (conversation) {
return Badge(count: conversation.unreadMessageCount);
},
)
CometChatMessageHeader(
listItemView: (group, user, context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Thread", style: TextStyle(fontWeight: FontWeight.bold)),
Text(user?.name ?? group?.name ?? ""),
],
);
},
)Available slot views per component:
CometChatConversations:subtitleView,listItemView,trailingView,leadingView,titleViewCometChatMessageHeader:subtitleView,listItemView,trailingViewCometChatMessageList:headerView,footerView,loadingStateView,emptyStateView,errorStateViewCometChatUsers:subtitleView,listItemView,leadingView,titleView,trailingViewCometChatGroups:subtitleView,listItemView,leadingView,titleView,trailingView
Tier 3: Text Formatters
Custom text formatters transform how message text is displayed:
CometChatMessageList(
textFormatters: [
CometChatEmailFormatter(),
CometChatPhoneNumberFormatter(),
CometChatUrlFormatter(),
CometChatMentionsFormatter(
user: user,
group: group,
onMentionTap: (mention, mentionedUser, {message}) {
// Navigate to user's chat
},
),
],
)Built-in formatters:
CometChatEmailFormatter— makes emails tappableCometChatPhoneNumberFormatter— makes phone numbers tappableCometChatUrlFormatter— makes URLs tappableCometChatMentionsFormatter— handles @mentions with tap callbacks
Pass the same formatters to both CometChatMessageList and CometChatMessageComposer for consistency.
Tier 4: DataSource Decorator Pattern
The deepest customization level. ChatConfigurator uses a decorator pattern with MessagesDataSource as the base:
ChatConfigurator
└── DataSource (interface)
└── MessagesDataSource (default implementation)
└── ExtensionDecorator (wraps and overrides)How extensions use it
Each extension (polls, stickers, link preview, etc.) has a decorator:
// Example: PollsExtensionDecorator wraps the DataSource
class PollsExtensionDecorator extends DataSourceDecorator {
PollsExtensionDecorator(DataSource dataSource) : super(dataSource);
@override
List<CometChatMessageTemplate> getAllMessageTemplates() {
// Add poll template to existing templates
return [...super.getAllMessageTemplates(), _getPollTemplate()];
}
}Extensions are registered via UIKitSettingsBuilder:
final settings = (UIKitSettingsBuilder()
..extensions = CometChatUIKitChatExtensions.getDefaultExtensions()
..aiFeature = CometChatUIKitChatAIFeatures.getDefaultAiFeatures()
).build();Available extensions
| Extension | Decorator | What it adds |
|---|---|---|
| Polls | PollsExtensionDecorator | Poll creation + voting bubble |
| Stickers | StickersExtensionDecorator | Sticker keyboard + bubble |
| Link Preview | LinkPreviewExtensionDecorator | URL preview cards |
| Message Translation | MessageTranslationExtensionDecorator | Translate option |
| Image Moderation | ImageModerationExtensionDecorator | NSFW filter |
| Collaborative Document | CollaborativeDocumentExtensionDecorator | Shared doc |
| Collaborative Whiteboard | CollaborativeWhiteboardExtensionDecorator | Shared whiteboard |
| Thumbnail Generation | ThumbnailGenerationExtensionDecorator | Image thumbnails |
CometChatCallingExtension
The calling extension also uses this pattern:
class CometChatCallingExtension extends ExtensionsDataSource {
@override
void addExtension() {
ChatConfigurator.enable((dataSource) =>
CallingExtensionDecorator(dataSource, configuration: configuration));
}
}Message Templates
CometChatMessageTemplate defines how a message type is rendered:
CometChatMessageList(
templates: [
CometChatMessageTemplate(
type: 'custom_type',
category: 'custom',
contentView: (message, context, alignment) {
return Container(
child: Text('Custom bubble: ${message.id}'),
);
},
),
],
)Options Menu Customization
Add or replace long-press options on conversations, users, groups:
CometChatConversations(
// Replace all options
setOptions: (conversation, controller, context) {
return [CometChatOption(id: 'pin', title: 'Pin', onClick: () { ... })];
},
// Add to existing options
addOptions: (conversation, controller, context) {
return [CometChatOption(id: 'archive', title: 'Archive', onClick: () { ... })];
},
)Header Options (Messages)
CometChatMessageHeader(
options: (user, group, context) {
return [
CometChatOption(
id: 'user-info',
title: 'User Info',
iconWidget: Icon(Icons.info_outline),
onClick: () { ... },
),
CometChatOption(
id: 'search',
title: 'Search',
iconWidget: Icon(Icons.search),
onClick: () { ... },
),
];
},
)Checklist — Customization
- [ ] Start with props (Tier 1) before going deeper
- [ ] Slot views return
nullto fall back to default rendering - [ ] Text formatters consistent between MessageList and Composer
- [ ] Extensions registered via
UIKitSettingsBuilder.extensions - [ ] Custom templates specify
typeandcategory