unreadCount property
int
unreadCount
Unread count getter.
Implementation
int get unreadCount => currentUserRead?.unreadMessages ?? 0;
Setter for unread count.
Implementation
set unreadCount(int count) {
final reads = [..._channelState.read];
final currentUserReadIndex = reads.indexWhere(_isCurrentUserRead);
if (currentUserReadIndex < 0) return;
reads[currentUserReadIndex] =
reads[currentUserReadIndex].copyWith(unreadMessages: count);
_channelState = _channelState.copyWith(read: reads);
}