ClientState class
The class that handles the state of the channel listening to the events
Constructors
- ClientState(StreamChatClient _client)
- Creates a new instance listening to events and updating the state
Properties
-
channels
↔ Map<
String, Channel> -
The current list of channels in memory
getter/setter pair
-
channelsStream
→ Stream<
Map< String, Channel> > -
The current list of channels in memory as a stream
no setter
- currentUser ↔ OwnUser?
-
The current user
getter/setter pair
-
currentUserStream
→ Stream<
OwnUser?> -
The current user as a stream
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- totalUnreadCount ↔ int
-
The current total unread messages count
getter/setter pair
-
totalUnreadCountStream
→ Stream<
int> -
The current total unread messages count as a stream
no setter
- unreadChannels → int
-
The current unread channels count
no setter
-
unreadChannelsStream
→ Stream<
int> -
The current unread channels count as a stream
no setter
-
users
→ Map<
String, User> -
The current user
no setter
-
usersStream
→ Stream<
Map< String, User> > -
The current user as a stream
no setter
Methods
-
addChannels(
Map< String, Channel> channelMap) → void - Adds a list of channels to the current list of cached channels
-
cancelEventSubscription(
) → void - Stops listening to the client events.
-
dispose(
) → void - Call this method to dispose this object
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pauseEventSubscription(
[Future< void> ? resumeSignal]) → void - Pauses listening to the client events.
-
removeChannel(
String channelCid) → void - Removes the channel from the cached list of channels
-
resumeEventSubscription(
) → void - Resumes listening to the client events.
-
subscribeToEvents(
) → void - Starts listening to the client events.
-
toString(
) → String -
A string representation of this object.
inherited
-
updateUser(
User? user) → void -
Update the passed
user
in state -
updateUsers(
List< User?> userList) → void -
Update all the users with the provided
userList
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited