cometchat-flutter-v6-components
The Flutter v6 UI Kit widget catalog — which drop-in widgets exist, which barrel each comes from, and how to compose or swap them (conversations, messages, users, groups, threads, calling, bubbles). Triggers: 'what cometchat widgets are there', 'customize the message list flutter', 'swap the message bubble flutter', 'add a users list in flutter'.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 1.6k
- Forks
- 491
01 前言 Front Matter
- name
- cometchat-flutter-v6-components
- license
- MIT
- metadata
- { "tags": "cometchat flutter widgets components uikit catalog v6", "author": "CometChat", "version": "1.0.0" }
- description
- The Flutter v6 UI Kit widget catalog — which drop-in widgets exist, which barrel each comes from, and how to compose or swap them (conversations, messages, users, groups, threads, calling, bubbles). Triggers: 'what cometchat widgets are there', 'customize the message list flutter', 'swap the message bubble flutter', 'add a users list in flutter'.
- compatibility
- Flutter >=3.38.9; cometchat_chat_uikit ^6.2.0 (6.2.x; catalog compiler-verified vs 6.1.0, source-checked vs 6.2.0)
03 SKILL.md 正文
Ground truth:
catalogs/flutter-v6.json— 296 symbols, compiler-verified against the published 6.1.0, withsymbolsByBarrelrecording which barrel each resolves from. The lists below are that catalog, grouped. If a name is not in the catalog it does not exist — do not emit it. Props come from the docs.mdtwin (../cometchat-flutter-v6-core/references/docs-map.md), never from memory.
Companion skills (read first)
cometchat-flutter-v6-core— install, credentials,init→login→render, the two barrels. This skill ASSUMES it and does not repeat it.
Use this skill when
Choosing, composing, or swapping UI Kit widgets; "which widgets exist"; customizing a list, message, or bubble.
Prerequisites & install
Covered by core. This skill adds no package.
Widget catalog (BAKED closed list — from the catalog)
Lists & screens: CometChatConversations · CometChatUsers · CometChatGroups · CometChatGroupMembers · CometChatSearch · CometChatNotificationFeed
Messages: CometChatMessageHeader · CometChatMessageList · CometChatMessageComposer · CometChatThreadedHeader · CometChatMessageInformation · CometChatMessagePreview · CometChatReactions · CometChatReactionList · CometChatMediaRecorder · CometChatEmojiKeyboard · CometChatStickerKeyboard
Bubbles: CometChatTextBubble · CometChatImageBubble · CometChatVideoBubble · CometChatAudioBubble · CometChatFileBubble · CometChatVoiceNoteBubble · CometChatDeletedBubble · CometChatActionBubble · CometChatMessageBubble · CometChatLinkPreviewBubble · CometChatPollsBubble · CometChatStickerBubble · CometChatCollaborativeBubble · CometChatStreamBubble · CometChatAIAssistantBubble · CometChatCallBubble
Groups: CometChatChangeScope · CometChatCreatePoll
AI: CometChatAISmartRepliesView · CometChatAIConversationStarterView · CometChatAIConversationSummaryView · CometChatAIAssistantChatHistory · CometChatAIAssistantEvents
Theme primitives: CometChatColorPalette · CometChatTypography · CometChatSpacing · CometChatThemeHelper (→ -customization)
CometChatMediaRecorderandCometChatEmojiKeyboardare REAL in Flutter v6 even though they are phantoms in the React pack. Never carry another family's phantom list here — checkcatalogs/flutter-v6.json. Plural/singular matters:CometChatPollsBubble(notPollBubble),CometChatThreadedHeader(notThreadHeader).CometChatImagesBubble/CometChatAudiosBubble/CometChatFilesBubble/CometChatVideosBubblealso exist as the multi-attachment variants — the singular forms are the standard bubbles. Exception:CometChatAudioBubbleis a deprecated typedef alias forCometChatVoiceNoteBubble(audio_bubble/cometchat_voice_note_bubble.dart) — useCometChatVoiceNoteBubble(single voice note) orCometChatAudiosBubble(multi-attachment) instead; it compiles today but rides a deprecated symbol (AUDIT-233). The message-translation bubble is UN-prefixed (MessageTranslationBubble); only its style class carries the prefix.
Calls widgets live in the OTHER barrel (compile trap)
CometChatIncomingCall · CometChatOutgoingCall · CometChatOngoingCall · CometChatCallButtons · CometChatCallLogs · CometChatCallBubble · CometChatCalls resolve only from:
import 'package:cometchat_chat_uikit/cometchat_calls_uikit.dart';
That barrel does not re-export the chat widgets, so a calls screen imports both. Detail: cometchat-flutter-v6-calls.
Swap / compose slots
- Custom UI goes IN a widget's slot, never stacked beside it. Every list widget exposes
listItemView(replace the whole row) plus finer slots —leadingStateView·titleView·subtitleView·trailingView— and state slotsloadingStateView/emptyStateView/errorStateView. - Check the parameter ORDER before writing a slot. v6 slots are not uniform:
CometChatConversations.leadingViewis(context, conversation), whileCometChatMessageHeader.subtitleViewis(group, user, context). Fetch the widget's.mdtwin rather than assuming. - Prefer configuring the highest-level widget over rebuilding it from bubbles.
- Reuse built-in callbacks before adding your own control —
onItemTap·onItemLongPress·onSelection·onBack·onError·onLoad. Note the arity differs by widget:CometChatUsers/CometChatGroupstakeonItemTap: (context, item), whileCometChatConversations/CometChatGroupMemberstakeonItemTap: (item). - Scope data with the request builder, not a client-side filter:
conversationsRequestBuilder·usersRequestBuilder·groupsRequestBuilder·groupMembersRequestBuilder.
Swapping a bubble (message templates)
There is no per-bubble prop on the list — a custom bubble is a CometChatMessageTemplate whose bubbleView you override. Defaults come from MessageTemplateUtils (v6 replaced the v5 DataSource; CometChatUIKit.getDataSource() is gone).
Which prop you pass it to is NOT interchangeable (message-list § Message Templates; customization-view-slots; customization-datasource):
addTemplate:— merges with the defaults. This is the one for a message type of your own.templates:— replaces the whole default set.
Reach for addTemplate: for anything the kit does not already ship, and templates: only when you deliberately want to drop the defaults. Templates are keyed category_type, so an addTemplate: entry matching an existing key overrides just that bubble (customization-datasource).
Do not try to widen the list's fetch with your own builder: message-list states that uid, guid, types and categories on a MessagesRequestBuilder are always overridden inside the message list.
Overriding a type the kit already ships (templates:):
import 'package:cometchat_chat_uikit/cometchat_chat_uikit.dart';
import 'package:flutter/material.dart';
final textTemplate = CometChatMessageTemplate(
type: CometChatMessageType.text,
category: CometChatMessageCategory.message,
bubbleView: (message, context, alignment) =>
message is TextMessage ? Text(message.text) : const SizedBox.shrink(),
);
Adding a type of your own (addTemplate:):
import 'package:cometchat_chat_uikit/cometchat_chat_uikit.dart';
import 'package:flutter/material.dart';
final diceRollTemplate = CometChatMessageTemplate(
type: 'game_roll', // your own type string
category: CometChatMessageCategory.custom, // CustomMessage is always `custom`
bubbleView: (message, context, alignment) => Text(
message is CustomMessage ? '${message.customData?['value']}' : ''),
);
Widget gameChat(Group group) => CometChatMessageList(
group: group,
addTemplate: [diceRollTemplate], // `templates:` here would render nothing
);
Creating a group (host-composed — no kit widget)
v6 ships no create-group widget; build the form yourself and create with the SDK. It MUST offer all three types — Public · Private · Password-protected — with the password field required for the third.
import 'package:cometchat_chat_uikit/cometchat_chat_uikit.dart';
Future<void> createGroup(String guid, String name, String? password) async {
final group = Group(
guid: guid, name: name, type: CometChatGroupType.password, password: password);
// NOTE: `group:` is a NAMED parameter, and onSuccess/onError are both required.
await CometChat.createGroup(group: group, onSuccess: (g) {}, onError: (e) {});
}
Common pitfalls (BAKED)
- Emitting a widget that isn't in the catalog — the #1 hallucination. Check first.
- Importing a calls widget from the chat barrel — does not compile (see above).
- Assuming a slot's parameter order or arity — v6 is inconsistent between widgets; fetch the twin.
- Stacking custom UI beside a widget instead of passing it into the slot.
- Emitting a widget below its
contracts.flutter-v6.jsonminimum — a group-details screen needs view/kick/ban/scope, not just a member list. - Hand-rolling moderation or report UI — both are automatic in
CometChatMessageList. - v5 shells (
CometChatConversationsWithMessages,CometChatMessages,CometChatUI,CometChatUserList) — all removed; the host composes screens (→-migration).
Verify it works
The widget renders and its data populates. Empty ⇒ confirm init + login completed before the screen built (core's gate), and that any list has a bounded height (Expanded).
04 同仓库更多 Skills
migrate-to-e2e
Moves an existing Playwright, Cypress, Selenium, Appium, Detox, Maestro, or TesterArmy suite to e2e one slice at a time, with the old suite running beside the new one until each ported test is proven. Keeps a MIGRATION.md progress file so any later session resumes where the last stopped. Optionally plants a defect to show both suites catch it. Use for /migrate-to-e2e, "migrate our tests to e2e", "port these Maestro flows", "move our TesterArmy tests", or when a project has an e2e config and an older suite still running.
e2e
Writes, runs, and debugs end-to-end tests for web and mobile apps with e2e, the agentic test runner, which mixes agent.act goals with exact locator assertions on a Playwright browser or an iOS or Android device. Also drives a project's running app live over the e2e MCP server to look at a screen, check a UI change, take a screenshot or record a video, and try a locator; and runs bug bashes, parallel e2e explore runs with each bug proven by a repro test. Use when a project depends on e2e or has an e2e.config.ts, when asked for end-to-end, browser, mobile, or agentic UI tests, to check a change in the running app, to QA or bug bash an app or branch, or when an e2e run fails.
create-verification-skill
Generate a project-local verify-<app> skill on top of e2e, so any coding agent can launch the app, check it is worth driving, exercise a feature the way a user does, keep evidence, and bug bash it. Writes the skill, a feature map with one explore charter per feature, and proves it once. Use for /create-verification-skill, "make a verification skill for this repo", or when a project has no scripted way to prove UI behavior.
deja-search
deja-vu memory — search the user's past AI coding sessions with the deja CLI. Holds what they already settled and never wrote into the repo (naming rules, banned or already-tried tools, required checks before merge, preferred values, who owns what). Use before your first edit in a task, before you call a change done or ready to merge, before you recommend a tool, library, design or reviewer, before re-debugging an error that may already be solved, when they say 'didn't we fix this before', 'what did we decide about X' or 'I already have that', and before telling them something on this machine does not exist.
deja-reflect
End-of-session reflection and memory curation with deja-vu. Review what was decided, what commands broke and what repaired them, and record durable project rules or decisions with deja remember so the next session starts with them.
revid
Make, edit, export and post AI videos with Revid (revid.ai) through the Revid MCP server. Use whenever the user wants a short-form or long-form video made (from an idea, a script, a URL, an article, a PDF, a tweet, a product page, their own clips, or a song), wants to find what is going viral on TikTok, YouTube, Instagram or X before making something, wants to edit or re-export an existing Revid project, generate a standalone AI image or clip, make a series episode, or publish and schedule a finished video to connected social accounts. Covers setup (hosted MCP with OAuth, or an API key), the 36 tools, credits, polling and the rules for publishing. Routes to the more specific revid-* skills when one fits.