CometChatConversationsWithMessages
is a Composite Widget encompassing widgets such as Conversations, Messages, and Contacts. Each of these widgets contributes to the functionality and structure of the overall CometChatConversationsWithMessages
widget.
Widgets | Description |
---|---|
Conversations | The Conversations widget is designed to display a list of either User or Group . This essentially represents your recent conversation history. |
Messages | The Messages widget is designed to manage the messaging interaction for either individual User or Group conversations. |
Contacts | The CometChatContacts widget is specifically designed to facilitate the display and management of both User and Groups . |
CometChatConversationsWithMessages
is a widget, it can be launched either by a button click or through any event’s trigger. It inherits all the customizable properties and methods of CometChatConversations.
You can launch CometChatConversationsWithMessages
directly using Navigator.push
, or you can define it as a widget within the build
method of your State
class.
CometChatConversationsWithMessages
CometChatConversationsWithMessages
as a Widget in the build MethodCometChatConversationsWithMessages
Property | Data Type | Description |
---|---|---|
user | User? | The user object representing the current user. |
group | Group? | The group object representing the current group. |
theme | Theme? | The theme object for customizing the appearance of the widget. |
conversationsConfiguration | ConversationsConfiguration? | Configuration settings for the conversations list. |
messageConfiguration | MessageConfiguration? | Configuration settings for individual messages. |
startConversationConfiguration | StartConversationConfiguration? | Configuration settings for starting new conversations. |
CometChatConversationsWithMessages
widget does not have its actions, its sub-widgets - Conversation, Messages, and Contacts - each have their own set of actions.
The actions of these widgets can be overridden through the use of the Configurations object of each widget. Here is an example code snippet.
CometChatConversationsWithMessages
widget does not have filters, its widgets do, For more detail on individual filters of its widget refer to ConversationsFilters and Messages Filters.
By utilizing the Configurations object of its widgets, you can apply filters.
In the following example, we’re filtering Conversation to only show User
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 CometChatConversationsWithMessages
does not produce any events but its subwidget does. For a full list of these events, you can refer to Conversations events and Messages events.
In the following example, we’re incorporating observers for the ConversationDeleted
event of Conversations
widget.
This ccConversationDeleted
will be emitted when the user deletes a conversation
CometChatConversationsWithMessages
widget. We provide exposed methods that allow you to modify the experience and behavior according to your specific needs.
user
function with a User object as input to CometChatConversationsWithMessages
. This will automatically guide you to the Messages widget for the designated User
.
set(group: Group?)
function with a Group object as input to CometChatConversationsWithMessages
. This will automatically guide you to the Messages widget for the designated Group
.
Conversations
subwidget to navigate the user from Conversations to ContactsMessages
subwidget to navigate the user from Messages to Details.Conversations
, Messages
, and Contacts
widget. Hence, each of these widgets will have its individual `Configuration“.
Configurations
expose properties that are available in its individual widgets..conversationsConfiguration
method as demonstrated below: