Skip to main content
The CometChat V6 UI Kit provides CometChatOutgoingMessageBubbleStyle and CometChatIncomingMessageBubbleStyle for fine-grained control over message bubble appearance. These classes extend ThemeExtension, allowing customizations through global theming or explicit style objects.

How These Classes Help

1. Targeted Customization

Customize specific attributes of message bubbles:
  • Background color, border radius, text style
  • Specialized bubbles: Audio, File, Collaborative, Poll, Deleted, Link Preview, Sticker, Call bubbles
  • Reactions, timestamps, avatars, and borders

2. Unified Global Theming

Apply styles via Flutter’s global theming or pass them to CometChatMessageListStyle:

3. Ease of Integration

Pass styles directly to CometChatMessageList:

Customizable Message Bubbles

Text Bubble

Image Bubble

Video Bubble

Voice Note Bubble

Styles the voice-note (recorded audio) bubble via voiceNoteBubbleStyle and CometChatVoiceNoteBubbleStyle.
The older audioBubbleStyle / CometChatAudioBubbleStyle names are deprecated aliases of voiceNoteBubbleStyle / CometChatVoiceNoteBubbleStyle and still work, but prefer the voice-note names.

File Bubble

Sticker Bubble

Call Bubble

Collaborative Whiteboard Bubble

Collaborative Document Bubble

Poll Bubble

Action Message Bubble

Deleted Message Bubble

AI Assistant Bubble

Multiple Attachments

When enableMultipleAttachments is on, a message’s images / videos / audio files / documents render through dedicated multi-attachment bubbles. These are styled differently from the single-attachment bubbles above: each has its own ThemeExtension class that you register directly in ThemeData.extensions — they are not nested inside CometChatIncomingMessageBubbleStyle / CometChatOutgoingMessageBubbleStyle.
Both families can coexist. The single-attachment imageBubbleStyle / videoBubbleStyle / voiceNoteBubbleStyle / fileBubbleStyle apply when a message carries one attachment (or when multiple attachments are disabled); the classes below apply to the multi-attachment grids and lists.

Images Bubble — CometChatImagesBubbleStyle

Images bubble rendering a 2×2 grid of image attachments with a +N overflow tile
The count-based image grid (1 / 2 / 3 / 4 / 5+ with a “+N” overflow tile).

Videos Bubble — CometChatVideosBubbleStyle

Videos bubble rendering a 2×2 grid of video attachments with play badges and a +N overflow tile
The video grid — poster frames under a play badge, with an optional duration chip.

Audios Bubble — CometChatAudiosBubbleStyle

Audios bubble rendering a stack of inline audio player rows with a Show more toggle
The stack of inline audio-file player rows (picked audio files, not voice notes).

Files Bubble — CometChatFilesBubbleStyle

Files bubble rendering a stack of document cards with type icon, name, size and download, plus a Show more toggle
The list of document/file cards (icon + name + download).

Media Grid — CometChatMediaGridStyle

The lower-level grid the Images and Videos bubbles build on. Most apps style via the two bubble classes above; register CometChatMediaGridStyle directly only to control the grid layer everywhere at once.