Widgets | Description |
---|---|
MessageHeader | 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 | CometChatMessageList is one of the core UI widgets. It displays a list of messages and handles real-time operations. |
MessageComposer | 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 | CometChatDetails is a widget that displays all the available options available for Users & Groups |
ThreadedMessages | CometChatThreadedMessages is a widget that displays all replies made to a particular message in a conversation. |
CometChatMessages
directly using Navigator.push
, or you can define it as a widget within the build
method of your State
class.
CometChatMessages
CometChatMessages
as a Widget in the build Method
The Messages Widget overrides the ThreadRepliesClick action to navigate to the ThreadedMessages component. If you override ThreadRepliesClick
, it will also override the default behavior of the Messages Widget.
MessageListConfiguration
.
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 |
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? |
MessageListStyle
and MessageComposerStyle
and then applying them to the Messages Widget using MessageListConfiguration
and MessageComposerConfiguration
.
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? |
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
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
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
MessageHeaderConfiguration
object.
MessageHeaderConfiguration
provides access to all the Action, Filters, Styles, Functionality, and Advanced properties of the MessageHeader 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 widget using
MessageHeaderConfiguration
.
MessageListConfiguration
object.
MessageListConfiguration
provides access to all the Action, Filters, Styles, Functionality, and Advanced properties of the MessageList 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 widget using
MessageListConfiguration
.
MessageComposerConfiguration
object.
MessageComposerConfiguration
provides access to all the Action, Filters, Styles, Functionality, and Advanced properties of the MessageComposer 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 widget using
MessageComposerConfiguration
.
ThreadedMessagesConfiguration
object.
ThreadedMessagesConfiguration
provides access to all the Action, Filters, Styles, Functionality, and Advanced properties of the ThreadedMessages 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 using
MessageListConfiguration
. We then apply these changes to the ThreadedMessages widget using ThreadedMessagesConfiguration
.
DetailsConfiguration
object.
DetailsConfiguration
provides access to all the Action, Filters, Styles, Functionality, and Advanced properties of the MessageComposer 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 widget using
DetailsConfiguration
.