ChatMessageModel class
Represents a chat message.
Constructors
-
ChatMessageModel({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, MessageCustomField? messageCustomField, required String messageId, required int messageSentTime, required String messageStatus, required bool isMessageEdited, required String messageTextContent, required String messageType, List<
MessageMetaData> ? metaData = const [], ReplyParentChatMessage? replyParentChatMessage, required String senderNickName, required String senderUserJid, required String senderUserName, ContactChatMessage? contactChatMessage, MediaChatMessage? mediaChatMessage, LocationChatMessage? locationChatMessage, required String topicId}) - Constructs a ChatMessageModel instance.
-
ChatMessageModel.fromJson(Map<
String, dynamic> json) -
Converts a JSON object into a ChatMessageModel instance.
factory
Properties
- chatUserJid ↔ String
-
The JID of the chat user.
getter/setter pair
- contactChatMessage ↔ ContactChatMessage?
-
The contact message.
getter/setter pair
- contactType ↔ String
-
The type of contact.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- isItCarbonMessage ↔ bool
-
Indicates whether the message is a carbon message.
getter/setter pair
- isItSavedContact ↔ bool
-
Indicates whether the contact is saved.
getter/setter pair
- isMessageDeleted ↔ bool
-
Indicates whether the message is deleted.
getter/setter pair
- isMessageEdited ↔ bool
-
Indicates whether the message is edited.
getter/setter pair
- isMessageRecalled ↔ bool
-
Indicates whether the message is recalled.
getter/setter pair
- isMessageSentByMe ↔ bool
-
Indicates whether the message was sent by the current user.
getter/setter pair
- isMessageStarred ↔ bool
-
Indicates whether the message is starred.
getter/setter pair
- isSelected ↔ bool
-
Indicates whether the message is selected.
getter/setter pair
- isThisAReplyMessage ↔ bool
-
Indicates whether the message is a reply message.
getter/setter pair
- locationChatMessage ↔ LocationChatMessage?
-
The location message.
getter/setter pair
- mediaChatMessage ↔ MediaChatMessage?
-
The media message.
getter/setter pair
- messageChatType ↔ String
-
The type of chat message.
getter/setter pair
- messageCustomField ↔ MessageCustomField?
-
The custom field of the message.
getter/setter pair
- messageId ↔ String
-
The ID of the message.
getter/setter pair
- messageSentTime ↔ int
-
The time the message was sent.
getter/setter pair
- messageStatus ↔ String
-
The status of the message.
getter/setter pair
- messageTextContent ↔ String
-
The content of the message.
getter/setter pair
- messageType ↔ String
-
The type of message.
getter/setter pair
-
metaData
↔ List<
MessageMetaData> ? -
The metadata of the message.
getter/setter pair
- replyParentChatMessage ↔ ReplyParentChatMessage?
-
The parent message of the reply message.
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 ID of the topic.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts a ChatMessageModel instance into a JSON object.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited