Chat constructor
Chat( - ChatId id, {
- ChatAvatar? avatar,
- ChatName? name,
- List<ChatMember> members = const [],
- int kindIndex = 0,
- bool isHidden = false,
- MuteDuration? muted,
- ChatDirectLink? directLink,
- PreciseDateTime? createdAt,
- PreciseDateTime? updatedAt,
- List<LastChatRead> lastReads = const [],
- PreciseDateTime? lastDelivery,
- ChatItem? firstItem,
- ChatItem? lastItem,
- ChatItemId? lastReadItem,
- int unreadCount = 0,
- int totalCount = 0,
- ChatCall? ongoingCall,
- ChatFavoritePosition? favoritePosition,
- int membersCount = 0,
})
Implementation
Chat(
this.id, {
this.avatar,
this.name,
this.members = const [],
this.kindIndex = 0,
this.isHidden = false,
this.muted,
this.directLink,
PreciseDateTime? createdAt,
PreciseDateTime? updatedAt,
this.lastReads = const [],
PreciseDateTime? lastDelivery,
this.firstItem,
this.lastItem,
this.lastReadItem,
this.unreadCount = 0,
this.totalCount = 0,
this.ongoingCall,
this.favoritePosition,
this.membersCount = 0,
}) : createdAt = createdAt ?? PreciseDateTime.now(),
updatedAt = updatedAt ?? PreciseDateTime.now(),
lastDelivery = lastDelivery ?? PreciseDateTime.now();