ChatMessage constructor
const
ChatMessage({
- required String id,
- required String chatId,
- required String authorId,
- required String authorDisplayName,
- String? authorAvatarUrl,
- required String text,
- required DateTime createdAt,
- DateTime? updatedAt,
- bool isSystem = false,
- bool isDeleted = false,
- String? replyToMessageId,
- ChatReplySnapshot? replyToSnapshot,
Creates a new ChatMessage.
Required parameters:
id: Unique identifierchatId: ID of the chatauthorId: ID of the message authorauthorDisplayName: Display name of the authortext: Message text contentcreatedAt: Creation date and time
Optional parameters:
authorAvatarUrl: Avatar URL for the authorupdatedAt: Last update date and timeisSystem: Whether this is a system message (default: false)isDeleted: Whether this message is deleted (default: false)replyToMessageId: ID of the message being replied toreplyToSnapshot: Snapshot of the replied message
Implementation
const ChatMessage({
required this.id,
required this.chatId,
required this.authorId,
required this.authorDisplayName,
this.authorAvatarUrl,
required this.text,
required this.createdAt,
this.updatedAt,
this.isSystem = false,
this.isDeleted = false,
this.replyToMessageId,
this.replyToSnapshot,
});