Conversation constructor
const
Conversation({
- required String id,
- required ConversationType type,
- required ConversationMode mode,
- String? name,
- String? avatarUrl,
- ConversationStatus status = ConversationStatus.active,
- List<
Participant> participants = const [], - Message? lastMessage,
- DateTime? lastMessageAt,
- int unreadCount = 0,
- DateTime? expiresAt,
- ParticipantRole myRole = ParticipantRole.member,
- String? myUserId,
- Map<
String, dynamic> ? metadata, - DateTime? createdAt,
- 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,
});