ChatMessage class Models

Constructors

ChatMessage({required ChatUser user, required DateTime createdAt, bool isMarkdown = false, String text = '', List<ChatMedia>? medias, List<QuickReply>? quickReplies, Map<String, dynamic>? customProperties, List<Mention>? mentions, MessageStatus? status = MessageStatus.none, ChatMessage? replyTo})
ChatMessage.fromJson(Map<String, dynamic> jsonData)
Create a ChatMessage instance from json data
factory

Properties

createdAt DateTime
Date of the message
getter/setter pair
customProperties Map<String, dynamic>?
A list of custom properties to extend the existing ones in case you need to store more things. Can be useful to extend existing features
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isMarkdown bool
If the message is Markdown formatted then it will be converted to Markdown (by default it will be false)
getter/setter pair
medias List<ChatMedia>?
List of medias of the message
getter/setter pair
mentions List<Mention>?
Mentioned elements in the message
getter/setter pair
quickReplies List<QuickReply>?
A list of quick replies that users can use to reply to this message
getter/setter pair
replyTo ChatMessage?
If the message is a reply of another one TODO:
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status MessageStatus?
Status of the message TODO:
getter/setter pair
text String
Text of the message (optional because you can also just send a media)
getter/setter pair
user ChatUser
Author of the message
getter/setter pair

Methods

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

Operators

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