cometchat/cometchat-uikit-flutter/cometchat-flutter-events
Claude Code and agent skill by cometchat/cometchat-uikit-flutter
- community
Checking that the SKILL.md file is still in the repository.
Use when working with real-time events, SDK listeners, or UI event streams in CometChat Flutter UIKit v6. Triggers on mentions of CometChatMessageEvents, CometChatUserEvents, CometChatGroupEvents, CometChatCallEvents, CometChatConversationEvents, MessageListener, UserListener, GroupListener, CallListener, ConnectionListener, ccMessageSent, ccMessageEdited, ccMessageDeleted, ccUserBlocked, ccUserUnblocked, ccGroupMemberKicked, ccGroupMemberBanned, onMessageReceived, onTypingStarted, onTypingEnded, onUserOnline, onUserOffline, onMessageDelivered, onMessageRead, addMessageListener, removeMessageListener, ChatSDKEventInitializer, or any real-time update handling in CometChat.
Install
npx vskill@latest install cometchat/cometchat-uikit-flutter/cometchat-flutter-eventsSKILL.md
The same SKILL.md was published earlier as cometchat/cometchat-uikit-flutter/cometchat-flutter-events.
CometChat Flutter UIKit — Events & Listeners
Two event systems: SDK listeners (from CometChat server) and UI events (from UIKit components).
SDK Listeners (Server → App)
Register on CometChat SDK directly. These fire when the server pushes real-time data.
Available Listener Types
| Listener Mixin | Register / Remove | Key Callbacks | |
|---|---|---|---|
MessageListener | CometChat.addMessageListener(id, this) / removeMessageListener(id) | onTextMessageReceived, onMediaMessageReceived, onCustomMessageReceived, onTypingStarted, onTypingEnded, onMessagesDelivered, onMessagesRead, onMessageEdited, onMessageDeleted | |
UserListener | CometChat.addUserListener(id, this) / removeUserListener(id) | onUserOnline, onUserOffline | |
GroupListener | CometChat.addGroupListener(id, this) / removeGroupListener(id) | onGroupMemberJoined, onGroupMemberLeft, onGroupMemberKicked, onGroupMemberBanned, onGroupMemberScopeChanged, onMemberAddedToGroup | |
CallListener | CometChat.addCallListener(id, this) / removeCallListener(id) | onIncomingCallReceived, onOutgoingCallAccepted, onOutgoingCallRejected, onIncomingCallCancelled | |
ConnectionListener | CometChat.addConnectionListener(id, this) / removeConnectionListener(id) | onConnected, onDisconnected, onConnecting, onFeatureThrottled |
Registration Pattern
UI Events (UIKit Component → App)
These fire when UIKit components perform actions. Use these to react to user interactions across components.
CometChatMessageEvents
CometChatUserEvents
CometChatGroupEvents
CometChatConversationEvents
SDK vs UI Events — When to Use Which
| Scenario | Use | |
|---|---|---|
| Incoming message from another user | SDK MessageListener.onTextMessageReceived | |
| Current user sent a message via composer | UI CometChatMessageEvents.ccMessageSent | |
| Another user comes online | SDK UserListener.onUserOnline | |
| Current user blocked someone via UIKit | UI CometChatUserEvents.ccUserBlocked | |
| Group member kicked by another admin | SDK GroupListener.onGroupMemberKicked | |
| Current user kicked someone via UIKit | UI CometChatGroupEvents.ccGroupMemberKicked |
Key distinction: SDK listeners fire for remote events. UI events fire for local user actions performed through UIKit components.
BLoC Components Handle Listeners Automatically
The UIKit BLoCs (ConversationsBloc, MessageListBloc, etc.) register all necessary SDK listeners internally. You do NOT need to register listeners for components you're using — they handle their own real-time updates.
Register your own listeners only when you need to:
- Update custom UI outside UIKit components
- Track events for analytics
- Sync state between screens
ChatSDKEventInitializer
Called automatically by CometChatUIKit._initiateAfterLogin(). Bridges SDK events to UIKit's internal event bus. You never need to call this manually.
Gotchas
- Listener IDs MUST be unique per registration. Using the same ID overwrites the previous listener silently — no error thrown, old listener just stops receiving events.
onTypingStarted/onTypingEndedonly fire ifsubscriptionTypewas set inUIKitSettings. Omitting it silently disables all presence/typing events.- SDK listeners fire on the main isolate. Heavy processing in callbacks blocks the UI thread. Offload to
compute()if needed. ccMessageSentfires three times per message: once withMessageStatus.inProgress, once withMessageStatus.sent(success), or once withMessageStatus.error(failure). Filter by status.- Connection listener's
onConnectedfires on reconnect — use it to trigger a silent refresh of your data. - Group listener callbacks include an
Actionobject (which is aBaseMessagesubclass). Don't confuse it with theActionwidget from Flutter.
Anti-Patterns
Checklist
- [ ] Listener IDs are unique (use timestamp or UUID suffix)
- [ ] All listeners registered in
initState()are removed indispose() - [ ]
subscriptionTypeset in UIKitSettings for presence/typing events - [ ]
ccMessageSenthandlers filter byMessageStatus - [ ] No redundant listeners for UIKit components that handle their own
- [ ]
Actionfrom CometChat SDK not confused with Flutter'sActionwidget (useimport 'package:cometchat_chat_uikit/cometchat_chat_uikit.dart' as cc;andcc.Action)
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-events/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-events)