MessageDto class

A chat message.

Inheritance

Constructors

MessageDto({required String id, required String conversationId, required int seq, required SenderType senderType, required String content, required DateTime createdAt, String? senderId, String? senderName, String visibility = 'public', String contentType = 'text', List<Attachment> attachments = const [], String? clientId, Json? metadata, String? deliveryStatus, String? deliveryError, DateTime? readAt})
Creates a message.
const
MessageDto.fromJson(Json j)
Parses the wire shape.
factory

Properties

attachments → List<Attachment>
Attached files.
final
clientId → String?
The optimistic id the sender chose; matches a pending bubble.
final
content → String
Message text (may be empty when only attachments are sent).
final
contentType → String
text or file.
final
conversationId → String
The conversation this row belongs to.
final
createdAt → DateTime
When it was created.
final
deliveryError → String?
Outbound delivery error on other channels.
final
deliveryStatus → String?
Outbound delivery status on other channels.
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
Unique id.
final
isLocal → bool
Rows the SDK made up locally (showMessage, notices); never persisted.
no setterinherited
isMine → bool
Written by this app's user.
no setter
kind → String
message or event.
no setteroverride
metadata → Json?
Rich card payload and other channel data.
final
readAt → DateTime?
When the other side read it.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
senderId → String?
The sender's id (visitor id, user id, ...).
final
senderName → String?
Display name of the sender when known.
final
senderType → SenderType
Who wrote it.
final
seq → int
Position in the conversation (monotonic).
final
visibility → String
public for everything a visitor sees.
final

Methods

copyWith({String? id, int? seq, DateTime? readAt, String? content, Json? metadata, bool clearReadAt = false}) → MessageDto
Copies with some fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Json
The wire shape, including kind.
override
toString() → String
A string representation of this object.
inherited

Operators

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