Message constructor
const
Message({
- required String id,
- required String conversationId,
- required String senderId,
- required MessageContent content,
- required DateTime clientTimestamp,
- String? serverId,
- String? senderName,
- String? senderAvatar,
- String? anonymousName,
- String? anonymousAvatar,
- MessageType type = MessageType.text,
- MessageStatus status = MessageStatus.pending,
- DateTime? serverTimestamp,
- String? replyToId,
- Message? replyTo,
- List<
FileAttachment> attachments = const [], - List<
Reaction> reactions = const [], - List<
String> readBy = const [], - bool isDeleted = false,
- bool isEdited = false,
- bool isStarred = false,
- bool isPinned = false,
- DateTime? pinnedUntil,
- int localSequence = 0,
- Map<
String, dynamic> ? metadata,
Creates a message.
Implementation
const Message({
required this.id,
required this.conversationId,
required this.senderId,
required this.content,
required this.clientTimestamp,
this.serverId,
this.senderName,
this.senderAvatar,
this.anonymousName,
this.anonymousAvatar,
this.type = MessageType.text,
this.status = MessageStatus.pending,
this.serverTimestamp,
this.replyToId,
this.replyTo,
this.attachments = const [],
this.reactions = const [],
this.readBy = const [],
this.isDeleted = false,
this.isEdited = false,
this.isStarred = false,
this.isPinned = false,
this.pinnedUntil,
this.localSequence = 0,
this.metadata,
});