ChatMessage class

One message in a conversation. direction == 'inbound' was sent by the visitor (your user); 'outbound' was sent by an agent.

Constructors

ChatMessage({required int id, required MessageDirection direction, required String type, required String content, required DateTime createdAt, List<MessageAttachment> attachments = const []})
ChatMessage.fromJson(Map<String, dynamic> j)
factory

Properties

attachments → List<MessageAttachment>
final
content → String
final
createdAt → DateTime
final
direction → MessageDirection
final
hashCode → int
The hash code for this object.
no setterinherited
id → int
final
isFromAgent → bool
no setter
isFromVisitor → bool
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → String
'text' or 'attachment'. For 'attachment', the realtime broadcast payload also includes attachments entries with signed URLs — REST list responses do not. Use the broadcast payload for inline rendering, or refetch on history reload.
final

Methods

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

Operators

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