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
user OwnUser?
The current user
no setter
users Map<String, User>
The current user
no setter
usersStream Stream<Map<String, User>>
The current user as a stream
no setter
userStream Stream<OwnUser?>
The current user as a stream
no setter

Methods

dispose() → void
Call this method to dispose this object
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
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