Skillquality 0.46

cometchat-flutter-v5-messages

Use when working with CometChat Flutter UIKit v5 message components. Triggers on CometChatMessageList, CometChatMessageComposer, CometChatCompactMessageComposer, CometChatMessageHeader, threads.

Price
free
Protocol
skill
Verified
no

What it does

CometChat Flutter UIKit v5 — Messages

Components for displaying, sending, and managing messages.

CometChatMessageList

Displays messages in a conversation.

Key Props

PropTypeDefaultDescription
userUser?User for 1-on-1 chat (one of user/group required)
groupGroup?Group for group chat
messagesRequestBuilderMessagesRequestBuilder?Custom message fetch builder
styleCometChatMessageListStyle?Visual styling
alignmentChatAlignmentstandardstandard or leftAligned
onThreadRepliesClickThreadRepliesClick?Thread reply tap callback
templatesList<CometChatMessageTemplate>?Custom message templates
textFormattersList<CometChatTextFormatter>?Custom text formatters
receiptsVisibilitybooltrueShow read receipts
avatarVisibilitybooltrueShow avatars
disableReactionsboolfalseDisable reactions
disableMentionsbool?Disable @mentions
messageIdint?Scroll to specific message
startFromUnreadMessagesboolfalseStart from unread
showMarkAsUnreadOptionboolfalseShow mark-as-unread option
enableSmartRepliesboolfalseEnable AI smart replies
enableConversationStartersboolfalseEnable conversation starters
generateConversationSummaryboolfalseGenerate AI summary
hideEditMessageOptionboolfalseHide edit option
hideDeleteMessageOptionboolfalseHide delete option
hideReplyInThreadOptionboolfalseHide reply-in-thread
hideThreadViewbool?Hide thread view entirely
hideReactionOptionboolfalseHide reaction option
hideTranslateMessageOptionboolfalseHide translate option
hideMessagePrivatelyOptionboolfalseHide private message option
hideMessageInfoOptionboolfalseHide message info
hideFlagOptionboolfalseHide flag/report option
loadingStateViewWidgetBuilder?Custom loading state
emptyStateViewWidgetBuilder?Custom empty state
errorStateViewWidgetBuilder?Custom error state

Usage

CometChatMessageList(
  user: user,
  textFormatters: [
    CometChatEmailFormatter(),
    CometChatPhoneNumberFormatter(),
    CometChatUrlFormatter(),
    CometChatMentionsFormatter(user: user),
  ],
  receiptsVisibility: true,
  hideReplyInThreadOption: false,
  hideEditMessageOption: false,
  hideDeleteMessageOption: false,
)

CometChatMessageComposer

Full-featured message input with attachments, voice recording, mentions, and AI features.

Key Props

PropTypeDefaultDescription
userUser?Target user (one of user/group required)
groupGroup?Target group
messageComposerStyleCometChatMessageComposerStyle?Visual styling
parentMessageIdint0Thread parent message ID
placeholderTextString?Input placeholder
textFormattersList<CometChatTextFormatter>?Text formatters
disableTypingEventsboolfalseDisable typing indicators
disableMentionsbool?Disable @mentions
disableMentionAllboolfalseDisable @all mentions
hideVoiceRecordingButtonbool?Hide voice recording
hideAttachmentButtonbool?Hide attachment button
hideSendButtonbool?Hide send button
hideStickersButtonbool?Hide stickers
hideImageAttachmentOptionbool?Hide image attachment
hideVideoAttachmentOptionbool?Hide video attachment
hideAudioAttachmentOptionbool?Hide audio attachment
hideFileAttachmentOptionbool?Hide file attachment
hidePollsOptionbool?Hide polls
hideCollaborativeDocumentOptionbool?Hide collaborative doc
hideCollaborativeWhiteboardOptionbool?Hide whiteboard
hideTakePhotoOptionbool?Hide take photo
onSendButtonTapFunction?Custom send handler
onErrorOnError?Error callback

CometChatCompactMessageComposer

Compact variant with rounded pill-shaped input, inline rich text toolbar, and modern minimal aesthetic. Use it explicitly in your widget tree when you want this look — there is no global Layout toggle that swaps composers automatically.

Props unique to Compact (not in regular composer)

PropTypeDefaultDescription
compactMessageComposerStyleCometChatCompactMessageComposerStyle?Visual styling
enableRichTextFormattingbooltrueEnable rich text (master switch)
showRichTextFormattingOptionsbooltrueShow toolbar above composer
showTextSelectionMenuItemsbooltrueFormatting in text selection menu
hideRichTextFormattingOptionsSet<FormatType>?Hide specific format types
richTextToolbarStyleCometChatRichTextToolbarStyle?Toolbar styling
enterKeyBehaviorEnterKeyBehaviornewLineEnter key: sendMessage or newLine

All other props (user, group, parentMessageId, hide* options, textFormatters, etc.) are the same as CometChatMessageComposer.

Usage

// ✅ CORRECT — compact composer with thread support
CometChatCompactMessageComposer(
  user: user,
  parentMessageId: parentMessage.id,
  disableTypingEvents: false,
  disableMentions: false,
  hideVoiceRecordingButton: false,
)

CometChatMessageHeader

Displays user/group info. Implements PreferredSizeWidget for use as appBar.

Key Props

PropTypeDescription
userUser?User to display
groupGroup?Group to display
messageHeaderStyleCometChatMessageHeaderStyle?Visual styling
subtitleViewWidget? Function(Group?, User?, BuildContext)?Custom subtitle
listItemViewWidget Function(Group?, User?, BuildContext)?Custom list item
showBackButtonbool?Show back button (default: true)
onBackVoidCallback?Back button callback
hideVideoCallButtonbool?Hide video call button
hideVoiceCallButtonbool?Hide voice call button
usersStatusVisibilityboolShow online status (default: true)
optionsFunction(User?, Group?, BuildContext)?Custom header options menu

CometChatThreadedHeader

Displays the parent message for threaded conversations.

Key Props

PropTypeDescription
parentMessageBaseMessageThe parent message (required)
loggedInUserUserCurrent logged-in user (NON-nullable; pass CometChatUIKit.loggedInUser!)
templateCometChatMessageTemplate?Message template
receiptsVisibilitybool?Show receipts
heightdouble?Header height
widthdouble?Header width
messageActionViewFunction(BaseMessage, BuildContext)?Builder for a custom action view in the header
styleCometChatThreadedHeaderStyle?Visual style
textFormattersList<CometChatTextFormatter>?Custom text formatters

Threaded Messages Pattern

Scaffold(
  body: Column(
    children: [
      CometChatThreadedHeader(
        parentMessage: parentMessage,
        loggedInUser: CometChatUIKit.loggedInUser!,
      ),
      Expanded(
        child: CometChatMessageList(
          user: user,
          messagesRequestBuilder: MessagesRequestBuilder()
            ..parentMessageId = parentMessage.id,
        ),
      ),
      CometChatMessageComposer(
        user: user,
        parentMessageId: parentMessage.id,
      ),
    ],
  ),
)

Sending Messages Programmatically

Use CometChatUIKit static methods (not CometChat directly) to ensure UIKit events fire:

// ✅ CORRECT
CometChatUIKit.sendTextMessage(message, onSuccess: ..., onError: ...);

// ❌ WRONG — bypasses UIKit events (ccMessageSent won't fire)
CometChat.sendMessage(message, onSuccess: ...);

Golden Path — Messages Screen

class MessagesScreen extends StatelessWidget {
  final User? user;
  final Group? group;
  const MessagesScreen({super.key, this.user, this.group});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: CometChatMessageHeader(
        user: user,
        group: group,
        onBack: () => Navigator.pop(context),
      ),
      body: Column(
        children: [
          Expanded(child: CometChatMessageList(user: user, group: group)),
          CometChatMessageComposer(user: user, group: group),
        ],
      ),
    );
  }
}

Anti-Patterns

// ❌ WRONG — passing two NON-null targets at the same time
CometChatMessageList(user: aUser, group: aGroup) // ambiguous — kit ignores group
// ✅ At any moment, exactly one of user/group must be non-null.
// Passing both fields with one null (e.g. `user: user, group: null`) is fine
// and is what the chat-builder sample app does to switch between contexts.

// ❌ WRONG — using CometChat.sendMessage instead of CometChatUIKit
CometChat.sendMessage(message, onSuccess: ...);

Checklist — Messages Screen

  • Only one of user or group passed to each component
  • Same user/group passed to Header, List, and Composer
  • Thread replies use parentMessageId on both List and Composer
  • Messages sent via CometChatUIKit.sendTextMessage()

Capabilities

skillsource-cometchatskill-cometchat-flutter-v5-messagestopic-agent-skillstopic-ai-agenttopic-chattopic-claude-codetopic-cometchattopic-cursortopic-messagingtopic-nextjstopic-reacttopic-react-nativetopic-ui-kit

Install

Quality

0.46/ 1.00

deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 27 github stars · SKILL.md body (9,812 chars)

Provenance

Indexed fromgithub
Enriched2026-05-18 19:04:50Z · deterministic:skill-github:v1 · v1
First seen2026-05-07
Last seen2026-05-18

Agent access