ChannelMembers class

Delagetes the members changes in an instance of Channel.

Usually, used by PresenceChannel.

Constructors

ChannelMembers({required Map<String, MemberInfo?> membersMap, required String? myId})
ChannelMembers.onlyMe({required String myId, required Map<String, dynamic> myData})
Returns the instace containing data of the local user (client) only.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
membersCount int
Gives a length of membersMap.
no setter
membersMap Map<String, MemberInfo?>
getter/setter pair
myId String?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getAsMap() Map<String, MemberInfo?>
Gives this members as Map.
getMemberInfo(String id) MemberInfo?
Gives an instance of MemberInfo if any is in the membersMap.
getMyId() String?
Gives an id of the local user (client).
getMyMemberInfo() MemberInfo?
Gives an instance of MemberInfo if any is in the membersMap for the local user (client).
merge(Map<String, MemberInfo?> otherMap) → void
Merges the old membersMap with the new one (otherMap).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeMember({required String userId}) → void
toString() String
A string representation of this object.
inherited
updateMe({required String id, required MemberInfo? memberInfo}) → void
updateMember({required String id, required MemberInfo? info}) → void

Operators

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

Static Methods

tryParseFromMap({required Map<String, dynamic> data}) ChannelMembers?

Constants

userIdKey → const String