ClientState class Null safety
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
read / write
-
channelsStream
→ Stream<
Map< String, Channel> > -
The current list of channels in memory as a stream
read-only
- currentUser ↔ OwnUser?
-
The current user
read / write
-
currentUserStream
→ Stream<
OwnUser?> -
The current user as a stream
read-only
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
- totalUnreadCount ↔ int
-
The current total unread messages count
read / write
-
totalUnreadCountStream
→ Stream<
int> -
The current total unread messages count as a stream
read-only
- unreadChannels → int
-
The current unread channels count
read-only
-
unreadChannelsStream
→ Stream<
int> -
The current unread channels count as a stream
read-only
- user → OwnUser?
-
The current user
@Deprecated('Use `.currentUser` instead, Will be removed in future releases'), read-only
-
users
→ Map<
String, User> -
The current user
read-only
-
usersStream
→ Stream<
Map< String, User> > -
The current user as a stream
read-only
-
userStream
→ Stream<
OwnUser?> -
The current user as a stream
@Deprecated('Use `.currentUserStream` instead, Will be removed in future releases'), read-only
Methods
-
dispose(
) → void - Call this method to dispose this object
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent 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