ChannelClientState class

The class that handles the state of the channel listening to the events.

Constructors

ChannelClientState(Channel _channel, ChannelState channelState)
Creates a new instance listening to events and updating the state.

Properties

channelState ChannelState
The channel state related to this client.
no setter
channelStateStream Stream<ChannelState>
The channel state related to this client as a stream.
no setter
currentUserChannelRole String?
Channel role for the current user
no setter
currentUserMember Member?
Channel member for the current user.
no setter
currentUserRead Read?
Channel read for the logged in user.
no setter
currentUserReadStream Stream<Read?>
Channel read for the logged in user as a stream.
no setter
hashCode int
The hash code for this object.
no setterinherited
isUpToDate bool
Flag which indicates if ChannelClientState contain latest/recent messages or not.
getter/setter pair
isUpToDateStream Stream<bool>
isUpToDate flag count as a stream.
no setter
lastMessage Message?
Get channel last message.
no setter
lastMessageStream Stream<Message?>
Get channel last message.
no setter
members List<Member>
Channel members list.
no setter
membersStream Stream<List<Member>>
Channel members list as a stream.
no setter
messages List<Message>
Channel message list.
no setter
messagesStream Stream<List<Message>>
Channel message list as a stream.
no setter
pinnedMessages List<Message>
Channel pinned message list.
no setter
pinnedMessagesStream Stream<List<Message>>
Channel pinned message list as a stream.
no setter
read List<Read>
Channel read list.
no setter
readStream Stream<List<Read>>
Channel read list as a stream.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
threads Map<String, List<Message>>
The channel threads related to this channel.
no setter
threadsStream Stream<Map<String, List<Message>>>
The channel threads related to this channel as a stream.
no setter
typingEvents Map<User, Event>
Channel related typing users last value.
no setter
typingEventsStream Stream<Map<User, Event>>
Channel related typing users stream.
no setter
unreadCount int
Unread count getter.
getter/setter pair
unreadCountStream Stream<int>
Unread count getter as a stream.
no setter
watcherCount int?
Channel watcher count.
no setter
watcherCountStream Stream<int?>
Channel watcher count as a stream.
no setter
watchers List<User>
Channel watchers list.
no setter
watchersStream Stream<List<User>>
Channel watchers list as a stream.
no setter

Methods

deleteMessage(Message message, {bool hardDelete = false}) → void
Removes/Updates the message based on the hardDelete value.
dispose() → void
Call this method to dispose this object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeMessage(Message message) → void
Remove a message from this channelState.
retryFailedMessages() Future<void>
Retry failed message.
toString() String
A string representation of this object.
inherited
truncate() → void
Delete all channel messages.
updateChannelState(ChannelState updatedState) → void
Update channelState with updated information.
updateMessage(Message message) → void
Updates the message in the state if it exists. Adds it otherwise.
updateThreadInfo(String parentId, List<Message> messages) → void
Update threads with updated information about messages.

Operators

operator ==(Object other) bool
The equality operator.
inherited