ChatMessage class

A message data structure used by dash chat to handle messages and also to handle quick replies

Constructors

ChatMessage({String? id, required String? text, required ChatUser user, String? image, String? video, QuickReplies? quickReplies, String messageIdGenerator()?, DateTime? createdAt, Map<String, dynamic>? customProperties, List<Widget>? buttons})
ChatMessage.fromJson(Map json)

Properties

buttons List<Widget>?
Allows to set buttons that could help with implementing custom actions in message container.
getter/setter pair
createdAt DateTime
It's a non-optional pararmter which specifies the time the message was delivered takes a DateTime object.
getter/setter pair
customProperties Map<String, dynamic>?
Allows to set custom-properties that could help with implementing custom functionality to dashchat.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id String?
Id of the message if no id is supplied a new id is assigned using a UUID v4 this behaviour could be overriden by provind and optional paramter called messageIdGenerator. messageIdGenerator take a function with this signature String Function()
getter/setter pair
image String?
A non-optional parameter which is used to display images takes a Sring as a url
getter/setter pair
quickReplies QuickReplies?
A non-optional parameter which is used to show quick replies to the user
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String?
Actual text message.
getter/setter pair
user ChatUser
Takes a ChatUser object which is used to distinguish between users and also provide avaatar URLs and name.
getter/setter pair
video String?
A non-optional parameter which is used to display vedio takes a Sring as a url
getter/setter pair

Methods

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

Operators

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