Skip to main content
The CometChatMessageInformation is a Widget designed to display message-related information, such as delivery and read receipts. It serves as an integral part of the CometChat UI UI Kit, extending the ListBase class, which provides the underlying infrastructure for CometChat UI widgets. With its rich set of methods and properties, developers can easily customize and tailor the appearance and behavior of the message information widget to suit the specific requirements of their application.
Image
CometChatMessageInformation is comprised of the following Base Widgets:

Usage

Integration

You can launch CometChatMessageInformation 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 CometChatMessageInformation
2. Embedding CometChatMessageInformation as a Widget in the build Method

Actions

Actions dictate how a widget functions. They are divided into two types: Predefined and User-defined. You can override either type, allowing you to tailor the behavior of the widget to fit your specific needs.
1. onClose
The onClose event is typically triggered when the back button is pressed and it carries a default action. However, with the following code snippet, you can effortlessly override this default operation.

2. onError
This action doesn’t change the behavior of the widget but rather listens for any errors that occur in the MessageList widget.

Filters

CometChatMessageInformation widget does not have any available filters.

Events

CometChatMessageInformation widget does not have any available events.

Customization

To fit your app’s design requirements, you can customize the appearance of the CometChatMessageInformation 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.
1. MessageInformation Style
To modify the styling, you can apply the MessageInformationStyle to the CometChatMessageInformation Widget using the messageInformationStyle method.
Image
The following properties are exposed by MessageInformationStyle:

2. ListItem Style
To apply customized styles to the ListItemStyle widget in the CometChatMessageInformation Widget, you can use the following code snippet. For more information, visit List Item Styles.

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.
Image
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 and then incorporate those into the widget.

ListItem Widget

With this function, you can assign a custom ListItem to the CometChatMessageInformation Widget.
Example Here is the complete example for reference:
custom_list_item.dart
main.dart
Image

Subtitle Widget

You can customize the subtitle widget for each item to meet your specific preferences and needs.
Image