internal_models/chat_messages_model library
Classes
- ChatMessage
- Represents a chat message with various properties.
- ContactChatMessage
- Represents a contact shared in a chat message.
- LocationChatMessage
- Represents a location shared in a chat message.
- MediaChatMessage
- Represents a media shared in a chat message.
- MessageCustomField
- Represents a custom field attached to a message.
- MessageStatus
- Represents the status of a message.
- ReplyParentChatMessage
- Represents a parent message that is being replied to.
Functions
-
chatMessageFromJson(
String str) → List< ChatMessage> - Converts a JSON string into a list of ChatMessage objects.
-
chatMessageToJson(
List< ChatMessage> data) → String - Converts a list of ChatMessage objects into a JSON string.
-
convertChatMessageJsonFromString(
String? str) → String - Converts a nullable JSON string into a non-nullable JSON string representing a single chat message.
-
convertChatMessagesJsonFromString(
String? str) → String - Converts a nullable JSON string into a non-nullable JSON string representing a list of chat messages.
-
getContactType(
Map< String, dynamic> json) → String - Determines the contact type based on the provided JSON map.
-
getMediaDownloadStatus(
int mediaDownloadStatus) → int - Determines the media download status for a given status code.
-
getMediaMessageType(
String type) → String - Determines the media message type based on the provided type value.
-
getMediaUploadStatus(
int mediaUploadStatus) → int - Determines the media upload status for a given status code.
-
getMessageStatus(
dynamic status) → String - Determines the message status based on the provided status value.
-
getMessageType(
dynamic type) → String - Determines the message type based on the provided type value.
-
getReplyMessageType(
dynamic json) → String - Determines the reply message type based on the provided JSON map.
-
sendMessageModelFromJson(
String str) → ChatMessage - Converts a JSON string into a single ChatMessage object.
-
sendMessageModelToJson(
ChatMessage data) → String - Converts a single ChatMessage object into a JSON string.