Skip to main content

Overview

CometChatMessageComposer is a Widget that enables users to write and send a variety of messages, including text, image, video, and custom messages. Features such as Live Reaction, Attachments, Message Editing, Rich Text Formatting, Code Blocks, and Inline Audio Recording are supported. CometChatMessageComposer is comprised of the following Base Widgets: In V6, the composer is powered by MessageComposerBloc and decomposed into focused sub-widgets.

Usage

Integration

1. Using Navigator to Launch CometChatMessageComposer
2. Embedding CometChatMessageComposer as a Widget in the build Method

Actions

1. OnSendButtonClick
The OnSendButtonClick event gets activated when the send message button is clicked.

2. onChange
Handles changes in the value of text in the input field.

3. onError
Listens for any errors that occur.

Filters

CometChatMessageComposer widget does not have any available filters.

Events

The CometChatMessageComposer Widget does not emit any events of its own.

Customization

Style

1. CometChatMessageComposerStyle
2. MediaRecorder Style

Functionality

Message Composer Properties


Advanced

TextFormatters


AttachmentOptions


AuxiliaryButton Widget

You can customize the auxiliary button area (mic, sticker, etc.) using the auxiliaryButtonView parameter:

Rich Text Formatting

The composer includes a WYSIWYG rich text toolbar. Configure it via richTextConfiguration:

Enable with defaults

Toolbar modes

Disable specific formats

RichTextConfiguration properties

Custom toolbar view


V6 Architecture

Sub-Widget Decomposition

BLoC Architecture

Use Cases