Conversation constructor

const Conversation({
  1. required String id,
  2. required ConversationType type,
  3. required ConversationMode mode,
  4. String? name,
  5. String? avatarUrl,
  6. ConversationStatus status = ConversationStatus.active,
  7. List<Participant> participants = const [],
  8. Message? lastMessage,
  9. DateTime? lastMessageAt,
  10. int unreadCount = 0,
  11. String? shareCode,
  12. DateTime? expiresAt,
  13. ParticipantRole myRole = ParticipantRole.member,
  14. String? myUserId,
  15. Map<String, dynamic>? metadata,
  16. DateTime? createdAt,
  17. DateTime? updatedAt,
})

Creates a conversation.

Implementation

const Conversation({
  required this.id,
  required this.type,
  required this.mode,
  this.name,
  this.avatarUrl,
  this.status = ConversationStatus.active,
  this.participants = const [],
  this.lastMessage,
  this.lastMessageAt,
  this.unreadCount = 0,
  this.shareCode,
  this.expiresAt,
  this.myRole = ParticipantRole.member,
  this.myUserId,
  this.metadata,
  this.createdAt,
  this.updatedAt,
});