Skip to main content

Overview

ThreadedMessages is a Composite Widget that displays all replies made to a particular message in a conversation. By default, the parent message will be displayed at the top, the message composer will be at the bottom and between them a message list will contain all replies.
ThreadedMessages is composed of the following widgets:

Usage

Integration

You can launch CometChatThreadedHeader directly using Navigator.push, or you can define it as a widget within the build method of your State class.
1. Using Navigator to Launch CometChatThreadedHeader
2. Embedding CometChatThreadedHeader as a Widget in the build Method

Customization

To fit your app’s design requirements, you can customize the appearance of the conversation widget. We provide exposed methods that allow you to modify the experience and behavior according to your specific needs.

Style

Using Style you can customize the look and feel of the widget in your app, These parameters typically control elements such as the color, size, shape, and fonts used within the widget.

Thread Header

To modify the styling, you can apply the ThreadedHeaderStyle to the CometChatThreadedHeader Widget using the style property.
The following properties are exposed by ThreadedMessagesStyle:

Functionality

These are a set of small functional customizations that allow you to fine-tune the overall experience of the widget. With these, you can change text, set custom icons, and toggle the visibility of UI elements. Below is a list of customizations along with corresponding code snippets

Advanced

For advanced-level customization, you can set custom widgets to the widget. This lets you tailor each aspect of the widget to fit your exact needs and application aesthetics. You can create and define your widgets, layouts, and UI elements and then incorporate those into the widget.

MessageActionView

By utilizing the messageActionView method, you can assign custom actions to the parent message bubble widget inside the CometChatThreadedHeader Widget. Example Here is the complete example for reference:
Image

Templates

The template method is used to configure and set a list of templates for message bubbles. It allows for dynamic customization of message appearance, content, or other predefined settings based on the templates provided. This method can be called to update or apply a new set of templates to the message handling system.