> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-audit-content-webhooks.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Messages

> Messages — CometChat documentation.

## Overview

The Messages is a [Composite Widget](/ui-kit/flutter/v4/components-overview#composite-components) that manages messages for users and groups.

<Tabs>
  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/SIU3NLl8GrgWvCMj/images/4b037d79-messages_overview_cometchat_screens-d9d1c7b2bf19cf0c581ee01b0438b89c.png?fit=max&auto=format&n=SIU3NLl8GrgWvCMj&q=85&s=666d665923350138a6b5240e20b162c9" alt="Image" width="4498" height="3120" data-path="images/4b037d79-messages_overview_cometchat_screens-d9d1c7b2bf19cf0c581ee01b0438b89c.png" />
  </Tab>

  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/W0TFCZ2NyXOY9_IP/images/a7bf1762-messages_overview_cometchat_screens-7c919a67b4d14e33d632473b8afff52d.png?fit=max&auto=format&n=W0TFCZ2NyXOY9_IP&q=85&s=767553ebe2e729d9921536c3579f1a39" alt="Image" width="4498" height="3120" data-path="images/a7bf1762-messages_overview_cometchat_screens-7c919a67b4d14e33d632473b8afff52d.png" />
  </Tab>
</Tabs>

The Messages widget is composed of three individual widgets, [MessageHeader](/ui-kit/flutter/v4/message-header), [MessageList](/ui-kit/flutter/v4/message-list), and [MessageComposer](/ui-kit/flutter/v4/message-composer). In addition, the Messages widget also navigates to the [Details](/ui-kit/flutter/v4/group-details) and [ThreadedMessages](/ui-kit/flutter/v4/threaded-messages) widgets.

| Widgets                                                  | Description                                                                                                                                                                                              |
| -------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [MessageHeader](/ui-kit/flutter/v4/message-header)       | `CometChatMessageHeader` displays the `User` or `Group` information using CometChat SDK's `User` or `Group object.` It also shows the typing indicator when the user starts typing in `MessageComposer`. |
| [MessageList](/ui-kit/flutter/v4/message-list)           | `CometChatMessageList` is one of the core UI widgets. It displays a list of messages and handles real-time operations.                                                                                   |
| [MessageComposer](/ui-kit/flutter/v4/message-composer)   | `CometChatMessageComposer` is an independent and critical widget that allows users to compose and send various types of messages includes text, image, video and custom messages.                        |
| [Details](/ui-kit/flutter/v4/group-details)              | `CometChatDetails` is a widget that displays all the available options available for `Users` & `Groups`                                                                                                  |
| [ThreadedMessages](/ui-kit/flutter/v4/threaded-messages) | `CometChatThreadedMessages` is a widget that displays all replies made to a particular message in a conversation.                                                                                        |

## Usage

### Integration

You can launch `CometChatMessages` 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 `CometChatMessages`

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    Navigator.push(context, MaterialPageRoute(builder: (context) => CometChatMessages())); // A user or group object is required to launch this widget.
    ```
  </Tab>
</Tabs>

##### 2. Embedding `CometChatMessages` as a Widget in the build Method

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    import 'package:cometchat_chat_uikit/cometchat_chat_uikit.dart';
    import 'package:flutter/material.dart';

    class Messages extends StatefulWidget {
      const Messages({super.key});

      @override
      State<Messages> createState() => _MessagesState();
    }

    class _MessagesState extends State<Messages> {

      @override
      Widget build(BuildContext context) {
        return Scaffold(
            body: SafeArea(
                child: CometChatMessages() // A user or group object is required to launch this widget.
            )
        );
      }
    }
    ```
  </Tab>
</Tabs>

***

### Actions

[Actions](/ui-kit/flutter/v4/components-overview#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.

The Messages widget does not have its actions. However, since it's a [Composite Widget](/ui-kit/flutter/v4/components-overview#composite-components), you can use the actions of its widgets by utilizing the [Configurations](#configuration) object of each component.

**Example**

In this example, we are employing the [ThreadRepliesClick](/ui-kit/flutter/v4/message-list#1-onthreadrepliesclick) action from the MessageList Widget through the MessageListConfiguration object.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatMessages(
      user: user,
      messageListConfiguration: MessageListConfiguration(
          onThreadRepliesClick: (message, context, {bubbleView}) {
            // TODO("Not yet implemented")
          },
      ),
    )
    ```
  </Tab>
</Tabs>

<Tabs>
  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/kibZL8uJM6A1yelM/images/28c42811-messages_to_threaded_messages_cometchat_screens-d08c8ffba289991d57678a3898812013.png?fit=max&auto=format&n=kibZL8uJM6A1yelM&q=85&s=08796d32d738341b23c3f661e0ee1221" alt="Image" width="4498" height="3120" data-path="images/28c42811-messages_to_threaded_messages_cometchat_screens-d08c8ffba289991d57678a3898812013.png" />
  </Tab>

  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/2xNny9K-x0AIgQXg/images/3cef774e-messages_to_threaded_messages_cometchat_screens-811d32240948effd7c92930896dc6e7c.png?fit=max&auto=format&n=2xNny9K-x0AIgQXg&q=85&s=a181f8e958c78f5bfa5b45e3f52a0297" alt="Image" width="4498" height="3120" data-path="images/3cef774e-messages_to_threaded_messages_cometchat_screens-811d32240948effd7c92930896dc6e7c.png" />
  </Tab>
</Tabs>

> The Messages Widget overrides the [ThreadRepliesClick](/ui-kit/flutter/v4/message-list#1-onthreadrepliesclick) action to navigate to the [ThreadedMessages](/ui-kit/flutter/v4/threaded-messages) component. If you override `ThreadRepliesClick`, it will also override the default behavior of the Messages Widget.

***

### Filters

**Filters** allow you to customize the data displayed in a list within a Widget. You can filter the list based on your specific criteria, allowing for a more customized. Filters can be applied using RequestBuilders of Chat SDK.

The Messages widget does not have its filters. But as it is a [Composite Widget](/ui-kit/flutter/v4/components-overview#composite-components), you can use the filters of its widgets by using the [Configurations](#configuration) object of each component. For more details on the filters of its widgets, please refer to [MessageList Filters](/ui-kit/flutter/v4/message-list#filters).

**Example**

In this example, we're applying the MessageList Widget filter to the Messages Widget using `MessageListConfiguration`.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatMessages(
      user: user,
      messageListConfiguration: MessageListConfiguration(
          messagesRequestBuilder: MessagesRequestBuilder()
            ..uid = user.uid
            ..searchKeyword = "searchKeyword"
      ),
    )
    ```
  </Tab>
</Tabs>

***

### Events

[Events](/ui-kit/flutter/v4/components-overview#events) are emitted by a `Widget`. By using event you can extend existing functionality. Being global events, they can be applied in Multiple Locations and are capable of being Added or Removed.

The list of events emitted by the Messages widget is as follows.

| Event                | Description                                                                                                                       |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| **ccMessageSent**    | Triggers whenever a loggedIn user sends any message, it will have two states such as: inProgress & sent                           |
| **ccMessageEdited**  | Triggers whenever a loggedIn user edits any message from the list of messages .it will have two states such as: inProgress & sent |
| **ccMessageDeleted** | Triggers whenever a loggedIn user deletes any message from the list of messages                                                   |
| **ccMessageRead**    | Triggers whenever a loggedIn user reads any message.                                                                              |
| **ccLiveReaction**   | Triggers whenever a loggedIn clicks on live reaction                                                                              |

**Example**

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    import 'package:cometchat_chat_uikit/cometchat_chat_uikit.dart';
    import 'package:flutter/material.dart';

    class YourScreen extends StatefulWidget {
      const YourScreen({super.key});

      @override
      State<YourScreen> createState() => _YourScreenState();
    }

    class _YourScreenState extends State<YourScreen> with CometChatMessageEventListener {

      @override
      void initState() {
        super.initState();
        CometChatMessageEvents.addMessagesListener("listenerId", this); // Add the listener
      }

      @override
      void dispose(){
        super.dispose();
        CometChatMessageEvents.removeMessagesListener("listenerId"); // Remove the listener
      }

      @override
      void ccMessageSent(BaseMessage message, MessageStatus messageStatus) {
        // TODO: implement ccMessageSent
        super.ccMessageSent(message, messageStatus);
      }

      @override
      void ccMessageEdited(BaseMessage message, MessageEditStatus status) {
        // TODO: implement ccMessageEdited
        super.ccMessageEdited(message, status);
      }

      @override
      void ccMessageDeleted(BaseMessage message, EventStatus messageStatus) {
        // TODO: implement ccMessageDeleted
        super.ccMessageDeleted(message, messageStatus);
      }

      @override
      void ccLiveReaction(String reaction) {
        // TODO: implement ccLiveReaction
        super.ccLiveReaction(reaction);
      }

      @override
      Widget build(BuildContext context) {
        return const Placeholder();
      }

    }
    ```
  </Tab>
</Tabs>

***

## Customization

To fit your app's design requirements, you can customize the appearance of the conversation component. 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 component.

##### 1. Messages Style

You can customize the appearance of the Messages Widget by applying the MessagesStyle to it using the following code snippet.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatMessages(
      user: user,
      messagesStyle: MessagesStyle(
        background: Color(0xFFE4EBF5),
      ),
    )
    ```
  </Tab>
</Tabs>

<Tabs>
  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/8XbB1iSxoMx7WJAy/images/89329c2b-messages_style_cometchat_screens-c6d6085996a08e6fdd5529d5f1f55ffd.png?fit=max&auto=format&n=8XbB1iSxoMx7WJAy&q=85&s=e05fe0586da94177c78b985c6b59dc99" alt="Image" width="4498" height="3120" data-path="images/89329c2b-messages_style_cometchat_screens-c6d6085996a08e6fdd5529d5f1f55ffd.png" />
  </Tab>

  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/nrKmc8-pXdAch9Hn/images/716cb797-messages_style_cometchat_screens-c8ad90995a7aae71e9d534f275cd936d.png?fit=max&auto=format&n=nrKmc8-pXdAch9Hn&q=85&s=735dcb2f31173bc390c9ea6d4a92e7f6" alt="Image" width="4498" height="3120" data-path="images/716cb797-messages_style_cometchat_screens-c8ad90995a7aae71e9d534f275cd936d.png" />
  </Tab>
</Tabs>

List of properties exposed by `MessagesStyle`

| Property          | Description                    | Code                          |
| ----------------- | ------------------------------ | ----------------------------- |
| **Background**    | Background color of the widget | `background: Color?`          |
| **Border**        | Border of the widget           | `border: Border?`             |
| **Border Radius** | Border radius of the widget    | `borderRadius: BorderRadius?` |
| **Gradient**      | Gradient of the widget         | `gradient: Gradient?`         |

***

##### 2. Widget's Styles

Being a [Composite component](/ui-kit/flutter/v4/components-overview#composite-components), the Messages Widget allows you to customize the styles of its widgets using their respective Configuration objects.

For a list of all available properties, refer to each component's styling documentation: [MesssageHeader Styles](/ui-kit/flutter/v4/message-header#style), [MessageList Styles](/ui-kit/flutter/v4/message-list#style), [MessageComposer Styles](/ui-kit/flutter/v4/message-composer#style), [Details Styles](/ui-kit/flutter/v4/group-details), [ThreadMessages Styles](/ui-kit/flutter/v4/threaded-messages).

**Example**

In this example, we are creating `MessageListStyle` and `MessageComposerStyle` and then applying them to the Messages Widget using `MessageListConfiguration` and `MessageComposerConfiguration`.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatMessages(
      user: user,
      messageListConfiguration: MessageListConfiguration(
        messageListStyle: MessageListStyle(
          background: Color(0xFFE4EBF5),
          border: Border.all(width: 3, color: Colors.red)
        ),
      ),
      messageComposerConfiguration: MessageComposerConfiguration(
          messageComposerStyle: MessageComposerStyle(
            background: Color(0xFFB39DDB),
              border: Border.all(width: 3, color: Colors.yellow)
          )
      ),
    )
    ```
  </Tab>
</Tabs>

***

### Functionality

These are a set of small functional customizations that allow you to fine-tune the overall experience of the component. With these, you can change text, set custom icons, and toggle the visibility of UI elements.

<Tabs>
  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/S4pTPhXdmnpWJLIt/images/2e56b6f4-messages_functionality_before_cometchat_screens-af17649219f316be631eb87097d4b709.png?fit=max&auto=format&n=S4pTPhXdmnpWJLIt&q=85&s=32450e450429a436b0f70a6c32b348ca" alt="Image" width="4498" height="3120" data-path="images/2e56b6f4-messages_functionality_before_cometchat_screens-af17649219f316be631eb87097d4b709.png" />
  </Tab>

  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/cD2BDn03AOl0XRHO/images/067a518e-messages_functionality_before_cometchat_screens-2824e96db7f750686cb7306fb80dce95.png?fit=max&auto=format&n=cD2BDn03AOl0XRHO&q=85&s=19337d5ca03be490637fb0d5be752fb5" alt="Image" width="4498" height="3120" data-path="images/067a518e-messages_functionality_before_cometchat_screens-2824e96db7f750686cb7306fb80dce95.png" />
  </Tab>
</Tabs>

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatMessages(
      user: user,
      hideMessageComposer: true,
      hideDetails: true
    )
    ```
  </Tab>
</Tabs>

<Tabs>
  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/_FJLMq1zvjiq9K4Y/images/12fee9d7-messages_functionality_after_cometchat_screens-bd078b8620c4f5673fecb0cbdb494042.png?fit=max&auto=format&n=_FJLMq1zvjiq9K4Y&q=85&s=024b27f5e955580f29a2239addbf5293" alt="Image" width="4498" height="3120" data-path="images/12fee9d7-messages_functionality_after_cometchat_screens-bd078b8620c4f5673fecb0cbdb494042.png" />
  </Tab>

  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/9fXSeDIZdfRZBzT6/images/1edb7f8e-messages_functionality_after_cometchat_screens-bd3ee0f57ae0348814083efa990a5dfc.png?fit=max&auto=format&n=9fXSeDIZdfRZBzT6&q=85&s=6b1ed77b5cbf2097225fd67f55930825" alt="Image" width="4498" height="3120" data-path="images/1edb7f8e-messages_functionality_after_cometchat_screens-bd3ee0f57ae0348814083efa990a5dfc.png" />
  </Tab>
</Tabs>

List of properties exposed by `CometChatMessages`

| Property                                      | Description                                            | Code                                            |
| --------------------------------------------- | ------------------------------------------------------ | ----------------------------------------------- |
| **User**                                      | User object for which the messages are to be shown     | `user: User?`                                   |
| **Group**                                     | Group object for which the messages are to be shown    | `group: Group?`                                 |
| **Hide Message Composer**                     | Toggles visibility for message composer                | `hideMessageComposer: bool?`                    |
| **Disable Typing**                            | If true, disables the typing indicator                 | `disableTyping: bool?`                          |
| **Custom Sound For Incoming Messages**        | Custom sound path for incoming messages                | `customSoundForIncomingMessages: String?`       |
| **Custom Sound For Incoming Message Package** | Package name for sound incoming from different package | `customSoundForIncomingMessagePackage: String?` |
| **Custom Sound For Outgoing Messages**        | Custom sound path for outgoing messages                | `customSoundForOutgoingMessages: String?`       |
| **Custom Sound For Outgoing Message Package** | Package name for sound outgoing from different package | `customSoundForOutgoingMessagePackage: String?` |
| **Hide Message Header**                       | Toggles visibility for message header                  | `hideMessageHeader: bool?`                      |
| **Disable Sound For Messages**                | Disables sound for incoming and outgoing message       | `disableSoundForMessages: bool?`                |
| **Theme**                                     | Custom theme for the messages screen                   | `theme: CometChatTheme?`                        |
| **Hide Details**                              | Toggles visibility for details icons                   | `hideDetails: bool?`                            |

***

### Advanced

For advanced-level customization, you can set custom widgets to the component. 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 component.

#### MessageHeaderView

You can set your custom message header widget using the `messageHeaderView` method. But keep in mind, by using this you will override the default message header functionality.

Here is the complete example for reference:

**Example**

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatMessages(
      user: user,
      messageHeaderView: (user, group, context) {
        return AppBar(
          backgroundColor: Color(0xFFE4EBF5),
          title: Text(user?.name ?? 'Default Title'),
          leading: IconButton(
            icon: Icon(Icons.arrow_back),
            onPressed: () {
                // TODO("Not yet implemented")
            },
          ),
        ); // Custom AppBar
      },
    )
    ```
  </Tab>
</Tabs>

<Tabs>
  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/TK46Vd2P-QKxY1cn/images/d8d6cd97-messages_set_header_view_cometchat_screens-8c40588ec7c933377cd867c8173261bd.png?fit=max&auto=format&n=TK46Vd2P-QKxY1cn&q=85&s=ba706c182b4a932822a9ca775413fb72" alt="Image" width="4498" height="3120" data-path="images/d8d6cd97-messages_set_header_view_cometchat_screens-8c40588ec7c933377cd867c8173261bd.png" />
  </Tab>

  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/nrKmc8-pXdAch9Hn/images/6c2f29ae-messages_set_header_view_cometchat_screens-0cafc18966774771c66c84acb83efa43.png?fit=max&auto=format&n=nrKmc8-pXdAch9Hn&q=85&s=ca52d414deea284d6998ee4d430f849d" alt="Image" width="4498" height="3120" data-path="images/6c2f29ae-messages_set_header_view_cometchat_screens-0cafc18966774771c66c84acb83efa43.png" />
  </Tab>
</Tabs>

***

#### MessageListView

You can set your custom message list widget using the `messageListView` method. But keep in mind, by using this you will override the default message ListView functionality.

Here is the complete example for reference:

**Example**

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatMessages(
      user: user,
      messageListView: (user, group, context) {
        return Container(
          margin: const EdgeInsets.all(10),
          decoration: BoxDecoration(
            color: Color(0xFFE4EBF5),
            borderRadius: BorderRadius.circular(10),
            border: Border.all(width: 5, color: Color(0xFF6851D6)),
          ),
          child: Center(
            child: CometChatMessageList(user: user,),
          ),
        );
      },
    )
    ```
  </Tab>
</Tabs>

<Tabs>
  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/8XbB1iSxoMx7WJAy/images/8ec231b6-messages_set_message_list_view_cometchat_screens-00493959e4f58828b2c8a15e4aae7ea9.png?fit=max&auto=format&n=8XbB1iSxoMx7WJAy&q=85&s=a709d020664e8107433492fb9e66ea5d" alt="Image" width="4498" height="3120" data-path="images/8ec231b6-messages_set_message_list_view_cometchat_screens-00493959e4f58828b2c8a15e4aae7ea9.png" />
  </Tab>

  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/74Lpy3GzpqtFJPKm/images/43cfeee9-messages_set_message_list_view_cometchat_screens-339f1b033b0810df2f3df432b2a8af91.png?fit=max&auto=format&n=74Lpy3GzpqtFJPKm&q=85&s=22e36aeca5d2cf04aed297dbd5df9568" alt="Image" width="4498" height="3120" data-path="images/43cfeee9-messages_set_message_list_view_cometchat_screens-339f1b033b0810df2f3df432b2a8af91.png" />
  </Tab>
</Tabs>

***

#### MessageComposerView

You can set your custom Message Composer widget using the `messageComposerView` method. But keep in mind, by using this you will override the default message composer functionality.

Here is the complete example for reference:

**Example**

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatMessages(
      user: user,
      messageComposerView: (user, group, context) {
        return Container(
          margin: const EdgeInsets.all(10),
          decoration: BoxDecoration(
            color: Color(0xFFE4EBF5),
            borderRadius: BorderRadius.circular(10),
            border: Border.all(width: 5, color: Colors.red),
          ),
          child: CometChatMessageComposer(user: user),
        );
      },
    )
    ```
  </Tab>
</Tabs>

<Tabs>
  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/0zf0AzyXRy6UbTAi/images/e88ce2e3-messages_set_message_composer_view_cometchat_screens-3487e80fb62b596765510b74a1594f1c.png?fit=max&auto=format&n=0zf0AzyXRy6UbTAi&q=85&s=63ae2a802bbc6711bda9bc44ca8766ce" alt="Image" width="4498" height="3120" data-path="images/e88ce2e3-messages_set_message_composer_view_cometchat_screens-3487e80fb62b596765510b74a1594f1c.png" />
  </Tab>

  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/0zf0AzyXRy6UbTAi/images/e93cdad0-messages_set_message_composer_view_cometchat_screens-cd5ddab04abca683eb05197361bb7593.png?fit=max&auto=format&n=0zf0AzyXRy6UbTAi&q=85&s=eef4000d00568cbad1e3cb1137b0bb85" alt="Image" width="4498" height="3120" data-path="images/e93cdad0-messages_set_message_composer_view_cometchat_screens-cd5ddab04abca683eb05197361bb7593.png" />
  </Tab>
</Tabs>

***

## Configuration

Configurations offer the ability to customize the properties of each individual widget within a Composite Widget.

The Messages Widget is a Composite Widget and it has a specific set of configuration for each of its widgets.

### MessageHeader

If you want to customize the properties of the [MessageHeader](/ui-kit/flutter/v4/message-header) Widget inside Messages Widget, you need use the `MessageHeaderConfiguration` object.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatMessages(
      user: user,
      messageHeaderConfiguration: MessageHeaderConfiguration(),
    )
    ```
  </Tab>
</Tabs>

The `MessageHeaderConfiguration` provides access to all the [Action](/ui-kit/flutter/v4/message-header#style), [Filters](/ui-kit/flutter/v4/message-header#filters), [Styles](/ui-kit/flutter/v4/message-header#style), [Functionality](/ui-kit/flutter/v4/message-header#functionality), and [Advanced](/ui-kit/flutter/v4/message-header#advanced) properties of the [MessageHeader](/ui-kit/flutter/v4/message-header) component.

> Please note that the properties marked with the 🛑 symbol are not accessible within the Configuration Object.

**Example**

In this example, we will be adding a custom back button and styling a few properties of the Avatar widget of the [MessageHeader](/ui-kit/flutter/v4/message-header) widget using `MessageHeaderConfiguration`.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatMessages(
      user: user,
      messageHeaderConfiguration: MessageHeaderConfiguration(
        avatarStyle: AvatarStyle(
            border: Border.all(width: 5),
            borderRadius: 20,
            background: Colors.red
        ),
      ),
    )
    ```
  </Tab>
</Tabs>

<Tabs>
  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/9fXSeDIZdfRZBzT6/images/20998b44-messages_message_header_configuration_cometchat_screens-eaee7972b33fa1748a5e4d6f38db9674.png?fit=max&auto=format&n=9fXSeDIZdfRZBzT6&q=85&s=c8979343da1cd73748d89648d1f5358a" alt="Image" width="4498" height="3120" data-path="images/20998b44-messages_message_header_configuration_cometchat_screens-eaee7972b33fa1748a5e4d6f38db9674.png" />
  </Tab>

  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/tnx7dFNyijg-6-_e/images/54c3ac3e-messages_message_header_configuration_cometchat_screens-495e190f5a6c80876b977f9cd738a2c0.png?fit=max&auto=format&n=tnx7dFNyijg-6-_e&q=85&s=44cc2140f01bf98025ba0ffbf28d8544" alt="Image" width="4498" height="3120" data-path="images/54c3ac3e-messages_message_header_configuration_cometchat_screens-495e190f5a6c80876b977f9cd738a2c0.png" />
  </Tab>
</Tabs>

***

### MessageList

If you want to customize the properties of the [MessageList](/ui-kit/flutter/v4/message-list) Widget inside Messages Widget, you need use the `MessageListConfiguration` object.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatMessages(
      user: user,
      messageListConfiguration: MessageListConfiguration(),
    )
    ```
  </Tab>
</Tabs>

The `MessageListConfiguration` provides access to all the [Action](/ui-kit/flutter/v4/message-list#style), [Filters](/ui-kit/flutter/v4/message-list#filters), [Styles](/ui-kit/flutter/v4/message-list#style), [Functionality](/ui-kit/flutter/v4/message-list#functionality), and [Advanced](/ui-kit/flutter/v4/message-list#advanced) properties of the [MessageList](/ui-kit/flutter/v4/message-list) component.

> Please note that the properties marked with the 🛑 symbol are not accessible within the Configuration Object.

**Example**

In this example, we will be changing the list alignment and modifying the message bubble styles in the [MessageList](/ui-kit/flutter/v4/message-list) widget using `MessageListConfiguration`.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatMessages(
      user: user,
      messageListConfiguration: MessageListConfiguration(
        alignment: ChatAlignment.leftAligned,
        messageListStyle: MessageListStyle(
            background: Color(0xFFE4EBF5),
            border: Border.all(width: 1, color: Colors.red),
            borderRadius: 10,
        ),
      ),
    )
    ```
  </Tab>
</Tabs>

<Tabs>
  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/Xfnkhe4h0jznSAyS/images/b4e44c35-messages_message_list_configuration_cometchat_screens-8cddc3e51a4460fa166ede80a54569ae.png?fit=max&auto=format&n=Xfnkhe4h0jznSAyS&q=85&s=5ee06f5a91be5c3ca0e9b83031ffddf2" alt="Image" width="4498" height="3120" data-path="images/b4e44c35-messages_message_list_configuration_cometchat_screens-8cddc3e51a4460fa166ede80a54569ae.png" />
  </Tab>

  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/wKi_davWP7OPe0wz/images/9d172d11-messages_message_list_configuration_cometchat_screens-719dec8033301ae9e9b9135728f1c07e.png?fit=max&auto=format&n=wKi_davWP7OPe0wz&q=85&s=7ce91161d28c92b4ac60f2cc719ded4b" alt="Image" width="4498" height="3120" data-path="images/9d172d11-messages_message_list_configuration_cometchat_screens-719dec8033301ae9e9b9135728f1c07e.png" />
  </Tab>
</Tabs>

***

### MessageComposer

If you want to customize the properties of the [MessageComposer](/ui-kit/flutter/v4/message-composer) Widget inside Messages Widget, you need use the `MessageComposerConfiguration` object.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatMessages(
      user: user,
      messageComposerConfiguration: MessageComposerConfiguration(),
    )
    ```
  </Tab>
</Tabs>

The `MessageComposerConfiguration` provides access to all the [Action](/ui-kit/flutter/v4/message-composer#style), [Filters](/ui-kit/flutter/v4/message-composer#filters), [Styles](/ui-kit/flutter/v4/message-composer#style), [Functionality](/ui-kit/flutter/v4/message-composer#functionality), and [Advanced](/ui-kit/flutter/v4/message-composer#advanced) properties of the [MessageComposer](/ui-kit/flutter/v4/message-composer) component.

> Please note that the properties marked with the 🛑 symbol are not accessible within the Configuration Object.

**Example**

In this example, we'll be adding a custom header widget and customizing some properties of the [MessageComposer](/ui-kit/flutter/v4/message-composer) widget using `MessageComposerConfiguration`.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatMessages(
      user: user,
      messageComposerConfiguration: MessageComposerConfiguration(
        headerView: (context, user, group, id) {
          return Container(
            width: MediaQuery.of(context).size.width/1.2,
            margin: const EdgeInsets.all(10),
            decoration: BoxDecoration(
              color: Color(0xFF6851D6),
              borderRadius: BorderRadius.circular(10),
              border: Border.all(width: 5, color: Color(0xFF6851D6)),
            ),
            child: Center(child: Text("Your Custom Header View", style: TextStyle(color: Colors.white),)),
          );
        },
        messageComposerStyle: MessageComposerStyle(
          background: Color(0xFFE4EBF5),
          border: Border.all(width: 1, color: Colors.red),
          borderRadius: 10,
        ),
      ),
    )
    ```
  </Tab>
</Tabs>

<Tabs>
  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/qwv2C0wM1Djl_VYB/images/f5b61772-messages_message_composer_configuration_cometchat_screens-4cab869cc5aff5ee0b0b93a0991899eb.png?fit=max&auto=format&n=qwv2C0wM1Djl_VYB&q=85&s=f5d316d9f2604667dd298bc98d6aa2f4" alt="Image" width="4498" height="3120" data-path="images/f5b61772-messages_message_composer_configuration_cometchat_screens-4cab869cc5aff5ee0b0b93a0991899eb.png" />
  </Tab>

  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/SIU3NLl8GrgWvCMj/images/495b9134-messages_message_composer_configuration_cometchat_screens-5017f406d40f9723fa93b23288ddbd83.png?fit=max&auto=format&n=SIU3NLl8GrgWvCMj&q=85&s=46b587d5d9c2c994ce356a1eb6a8bc2f" alt="Image" width="4498" height="3120" data-path="images/495b9134-messages_message_composer_configuration_cometchat_screens-5017f406d40f9723fa93b23288ddbd83.png" />
  </Tab>
</Tabs>

***

### ThreadedMessages

If you want to customize the properties of the [ThreadedMessages](/ui-kit/flutter/v4/threaded-messages) Widget inside Messages Widget, you need use the `ThreadedMessagesConfiguration` object.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatMessages(
      user: user,
      threadedMessagesConfiguration: ThreadedMessagesConfiguration()
    )
    ```
  </Tab>
</Tabs>

The `ThreadedMessagesConfiguration` provides access to all the [Action](/ui-kit/flutter/v4/threaded-messages#style), [Filters](/ui-kit/flutter/v4/threaded-messages#filters), [Styles](/ui-kit/flutter/v4/threaded-messages#style), [Functionality](/ui-kit/flutter/v4/threaded-messages#functionality), and [Advanced](/ui-kit/flutter/v4/threaded-messages#advanced) properties of the [ThreadedMessages](/ui-kit/flutter/v4/threaded-messages) component.

> Please note that the properties marked with the 🛑 symbol are not accessible within the Configuration Object.

**Example**

In this example, we are adding a custom title to the Threaded Message widget and also adding custom properties to the [MessageList](#messagelist) using `MessageListConfiguration`. We then apply these changes to the [ThreadedMessages](/ui-kit/flutter/v4/threaded-messages) widget using `ThreadedMessagesConfiguration`.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatMessages(
        user: user,
        threadedMessagesConfiguration: ThreadedMessagesConfiguration(
            title: "Your Custom Title",
            threadedMessagesStyle: ThreadedMessageStyle(
              background: Color(0xFFE4EBF5),
              border: Border.all(width: 1, color: Colors.red),
              borderRadius: 10,
            )
        )
    )
    ```
  </Tab>
</Tabs>

<Tabs>
  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/TK46Vd2P-QKxY1cn/images/d7990cdb-messages_message_threaded_messages_configuration_cometchat_screens-f89da91082a84ca4dc494a13aaf0138f.png?fit=max&auto=format&n=TK46Vd2P-QKxY1cn&q=85&s=41d8b8be825ae27d65c09f3530a33326" alt="Image" width="4498" height="3120" data-path="images/d7990cdb-messages_message_threaded_messages_configuration_cometchat_screens-f89da91082a84ca4dc494a13aaf0138f.png" />
  </Tab>

  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/tnx7dFNyijg-6-_e/images/51658e22-messages_message_threaded_messages_configuration_cometchat_screens-72ab5cd0f0a2a32882b9bd0ff14dc695.png?fit=max&auto=format&n=tnx7dFNyijg-6-_e&q=85&s=c73b8c68127da79e9b901fabffb91082" alt="Image" width="4498" height="3120" data-path="images/51658e22-messages_message_threaded_messages_configuration_cometchat_screens-72ab5cd0f0a2a32882b9bd0ff14dc695.png" />
  </Tab>
</Tabs>

***

### Details

If you want to customize the properties of the Details Widget inside Messages Widget, you need use the `DetailsConfiguration` object.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatMessages(
        user: user,
        detailsConfiguration: DetailsConfiguration()
    )
    ```
  </Tab>
</Tabs>

The `DetailsConfiguration` provides access to all the [Action](/ui-kit/flutter/v4/message-composer#style), [Filters](/ui-kit/flutter/v4/message-composer#filters), [Styles](/ui-kit/flutter/v4/message-composer#style), [Functionality](/ui-kit/flutter/v4/message-composer#functionality), and [Advanced](/ui-kit/flutter/v4/message-composer#advanced) properties of the [MessageComposer](/ui-kit/flutter/v4/message-composer) component.

> Please note that the properties marked with the 🛑 symbol are not accessible within the Configuration Object.

**Example**

In this example, we'll be customizing some properties of the [MessageComposer](/ui-kit/flutter/v4/message-composer) widget using `DetailsConfiguration`.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    CometChatMessages(
        user: user,
        detailsConfiguration: DetailsConfiguration(
            title: "Your Custom Title",
            avatarStyle: AvatarStyle(
                border: Border.all(width: 5),
                borderRadius: 20,
                background: Colors.red
            ),
            detailsStyle: DetailsStyle(
              background: Color(0xFFE4EBF5),
              border: Border.all(width: 1, color: Colors.red),
              titleStyle: TextStyle(color: Colors.red, fontFamily: "PlaywritePL"),
            )
        )
    )
    ```
  </Tab>
</Tabs>

<Tabs>
  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/wKi_davWP7OPe0wz/images/9d61ea95-messages_details_configuration_cometchat_screens-f24c1093d25fc44914fe4575ac0dea7a.png?fit=max&auto=format&n=wKi_davWP7OPe0wz&q=85&s=f3d4f2a74f8a4631a3d7fc905944bcdf" alt="Image" width="4498" height="3120" data-path="images/9d61ea95-messages_details_configuration_cometchat_screens-f24c1093d25fc44914fe4575ac0dea7a.png" />
  </Tab>

  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/B3XaZtq031kOZfI6/images/d44de8eb-messages_details_configuration_cometchat_screens-4383d4dbd7c8c8b2be8bdd6914f49d67.png?fit=max&auto=format&n=B3XaZtq031kOZfI6&q=85&s=73bbc7193ae17bef8fbc8966a7639051" alt="Image" width="4498" height="3120" data-path="images/d44de8eb-messages_details_configuration_cometchat_screens-4383d4dbd7c8c8b2be8bdd6914f49d67.png" />
  </Tab>
</Tabs>

***
