ChatMessage class

Represents a chat message with various properties.

Constructors

ChatMessage({required String chatUserJid, required String? contactType, required bool? isItCarbonMessage, required bool? isItSavedContact, required bool isMessageDeleted, required bool isMessageRecalled, required bool isMessageSentByMe, required bool isMessageStarred, required bool isSelected, required bool isThisAReplyMessage, required String messageChatType, required Map<String, dynamic> messageCustomField, required String messageId, required dynamic messageSentTime, required String messageStatus, required bool isMessageEdited, required String? messageTextContent, required String messageType, List<MessageMetaData>? metaData = const [], required ReplyParentChatMessage? replyParentChatMessage, required String senderNickName, required String senderUserJid, required String senderUserName, required ContactChatMessage? contactChatMessage, required MediaChatMessage? mediaChatMessage, required LocationChatMessage? locationChatMessage, required String? topicId})
Constructs an instance of ChatMessage.
ChatMessage.fromJson(Map<String, dynamic> json)
Creates a ChatMessage instance from a JSON map.
factory

Properties

chatUserJid String
The JID of the user involved in the chat.
getter/setter pair
contactChatMessage ContactChatMessage?
Details of the contact shared in the message. Nullable.
getter/setter pair
contactType String?
The type of contact (e.g., live, local, deleted). Nullable.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isItCarbonMessage bool?
Indicates if the message is a carbon copy. Nullable.
getter/setter pair
isItSavedContact bool?
Indicates if the contact is saved in the user's contacts. Nullable.
getter/setter pair
isMessageDeleted bool
Indicates if the message has been deleted.
getter/setter pair
isMessageEdited bool
Indicates if the message has been edited.
getter/setter pair
isMessageRecalled bool
Indicates if the message has been recalled.
getter/setter pair
isMessageSentByMe bool
Indicates if the message was sent by the current user.
getter/setter pair
isMessageStarred bool
Indicates if the message is starred.
getter/setter pair
isSelected bool
Indicates if the message is selected in the UI.
getter/setter pair
isThisAReplyMessage bool
Indicates if this message is a reply to another message.
getter/setter pair
locationChatMessage LocationChatMessage?
Details of the location shared in the message. Nullable.
getter/setter pair
mediaChatMessage MediaChatMessage?
Details of the media shared in the message. Nullable.
getter/setter pair
messageChatType String
The type of chat (e.g., single chat, group chat).
getter/setter pair
messageCustomField Map<String, dynamic>
A map of custom fields attached to the message.
getter/setter pair
messageId String
The unique identifier of the message.
getter/setter pair
messageSentTime ↔ dynamic
The time the message was sent. Can be of various types.
getter/setter pair
messageStatus String
The status of the message (e.g., sent, delivered, seen).
getter/setter pair
messageTextContent String?
The text content of the message. Nullable.
getter/setter pair
messageType String
The type of message (e.g., text, image, video).
getter/setter pair
metaData List<MessageMetaData>?
A list of metadata associated with the message. Nullable.
getter/setter pair
replyParentChatMessage ReplyParentChatMessage?
Information about the parent message if this is a reply. Nullable.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
senderNickName String
The nickname of the sender.
getter/setter pair
senderUserJid String
The JID of the sender.
getter/setter pair
senderUserName String
The username of the sender.
getter/setter pair
topicId String?
The topic ID associated with the message. Nullable.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts a ChatMessage instance to a JSON map.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited