cometchat/cometchat-uikit-flutter/cometchat-flutter-messages
Claude Code and agent skill by cometchat/cometchat-uikit-flutter
- community
Checking that the SKILL.md file is still in the repository.
Use when implementing the messages screen with CometChat Flutter UIKit v6. Covers CometChatMessageList, CometChatMessageComposer, CometChatMessageHeader, MessageListBloc, MessageComposerBloc, SliverSpacing, keyboard-aware spacing, rich text toolbar, CometChatTextBubble, CometChatImageBubble, CometChatVideoBubble, CometChatAudioBubble, CometChatFileBubble, CometChatMessageBubble, bubble factories, message templates, send message, edit message, delete message, reply, thread, reactions, receipts, typing indicators, mentions, markdown formatting, text formatters, scroll to bottom, unread messages, mark as read, goToMessageId, message options, swipe to reply, smart replies, or conversation starters. Also use when the user asks about building a chat screen, message input, or message display.
Install
npx vskill@latest install cometchat/cometchat-uikit-flutter/cometchat-flutter-messagesSKILL.md
The same SKILL.md was published earlier as cometchat/cometchat-uikit-flutter/cometchat-flutter-messages.
CometChat Flutter UIKit — Messages
The messages screen is composed of three components: CometChatMessageHeader, CometChatMessageList, and CometChatMessageComposer.
Complete Messages Screen
CometChatMessageList
Displays messages with SliverAnimatedList, O(1) lookups, and keyboard-aware spacing.
Key Props
| Prop | Type | Purpose | |
|---|---|---|---|
user / group | User? / Group? | Target conversation (one required) | |
goToMessageId | int? | Jump to specific message on load | |
startFromUnreadMessages | bool | Start from unread position | |
hideDeletedMessages | bool | Hide deleted message placeholders | |
disableReceipts | bool | Hide read/delivered receipts | |
disableReactions | bool | Hide reaction bar | |
enableSwipeToReply | bool | Swipe gesture for reply | |
hideDateSeparator | bool | Hide date headers | |
textFormatters | List<CometChatTextFormatter> | Formatters for message text | |
onThreadRepliesClick | Function(BaseMessage, BuildContext, {template}) | Thread navigation callback |
MessageListBloc Events
| Event | Purpose | |
|---|---|---|
LoadMessages(conversationWith, conversationType) | Initial load | |
LoadOlderMessages | Scroll up pagination | |
LoadNewerMessages | Scroll down pagination | |
MessageReceived(message) | Real-time incoming message | |
MessageEdited(message) | Real-time edit | |
MessageDeleted(message) | Real-time delete | |
JumpToMessage(messageId) | Scroll to specific message | |
MarkMessageAsRead(message) | Mark as read | |
MarkMessageAsUnread(message) | Mark as unread |
MessageListState
CometChatMessageComposer
Rich text input with formatting toolbar, attachments, mentions, and audio recording.
Key Props
| Prop | Type | Purpose | |
|---|---|---|---|
user / group | User? / Group? | Target conversation | |
disableTypingEvents | bool | Stop sending typing indicators | |
hideVoiceRecordingButton | bool | Hide audio recorder | |
hideSendButton | bool | Hide send button | |
hideAttachmentButton | bool | Hide attachment picker | |
hideStickersButton | bool | Hide sticker panel | |
disableMentions | bool | Disable @mentions | |
hideBottomSafeArea | bool | Hide bottom safe area padding | |
textFormatters | List<CometChatTextFormatter> | Text formatters |
Rich Text Formatting
The composer uses a WYSIWYG system (not the clean architecture module):
RichTextEditingController— span tracking, markdown rendering, format applicationSegmentComposerController— multi-segment (normal text + code blocks)- Toolbar buttons dispatch through
cometchat_message_composer.dart
buildWhen Optimization
The composer uses buildWhen to prevent rebuilds during keyboard animation:
CometChatMessageHeader
Shows user/group info, typing indicators, and optional call buttons.
Keyboard-Aware Spacing
SliverSpacing handles keyboard interaction inside the message list:
- At bottom: keyboard pushes list up (normal behavior)
- Scrolled up: list stays still, only composer moves
- Safe area: only added when keyboard is closed
Message Bubbles
| Type | Widget | Key Features | |
|---|---|---|---|
| Text | CometChatTextBubble | Rich text, links, markdown | |
| Image | CometChatImageBubble | Local/network, GIF, HEIC fallback | |
| Video | CometChatVideoBubble | Thumbnail, play overlay | |
| Audio | CometChatAudioBubble | Waveform, play/pause, duration | |
| File | CometChatFileBubble | Type icon, download, size | |
| Deleted | CometChatDeletedBubble | "Message was deleted" |
All bubble widgets accept optional colorPalette, spacing, typography params for the hybrid theme caching pattern.
Sending Messages
Thread Replies
Gotchas
textFormattersshould be the same list for bothCometChatMessageListandCometChatMessageComposerto ensure consistent rendering.- The rich text system has 3 implementations but only WYSIWYG is active at runtime. Bug fixes go in
rich_text_editing_controller.dart, not the clean architecture module. goToMessageIdloads messages around that ID, not from the beginning. The list may not have older messages loaded.- Keep mutable
_user/_groupcopies in your State class and update them from SDK listeners. Passingwidget.user/widget.groupdirectly means stale data after block/kick events. - The CometChat SDK has an
Actionclass (aBaseMessagesubclass used in group events like kick/ban/scope-change). It conflicts with Flutter's built-inActionwidget. If your messages screen uses SDK listener mixins that referenceAction, use an import alias:
``dart import 'package:cometchat_chat_uikit/cometchat_chat_uikit.dart' as cc; // Then use: cc.Action instead of Action ` This is especially common when mixing GroupListener` into a messages screen State class.
Anti-Patterns
Checklist
- [ ] Both list and composer have matching
textFormatters - [ ] Mutable
_user/_groupstate copies, notwidget.user/widget.group - [ ]
onThreadRepliesClicknavigates to thread screen withparentMessageId - [ ] SDK listeners update
_user/_groupfor block/kick/scope changes - [ ] Colors from
CometChatThemeHelper, cached indidChangeDependencies() - [ ] If using SDK listener mixins with
Action, import UIKitas ccto avoid Flutter name conflict
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/cometchat-flutter-messages/SKILL.md
Popularity
- Repository stars
- 520
- Repository forks
- 42
- 7-day trend score
- 31
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/cometchat/cometchat-uikit-flutter/cometchat-flutter-messages)