Sender class

Represents a sender.

Inheritance
Annotations

Constructors

Sender({bool isBlockedByMe = false, Role role = Role.none, required String userId, required String nickname, String profileUrl = '', UserConnectionStatus connectionStatus = UserConnectionStatus.notAvailable, int? lastSeenAt, List<String>? preferredLanguages, String friendDiscoveryKey = '', String friendName = '', Map<String, String> metaData = const {}, bool requireAuth = false})
Sender.fromJson(Map<String, dynamic> json)
factory
Sender.fromJsonWithChat(Chat chat, Map<String, dynamic> json)
factory

Properties

chat ↔ Chat
read / writeinherited
connectionStatus UserConnectionStatus
The user connection status type.
read / writeinherited
friendDiscoveryKey String
Represents friend discovery key.
read / writeinherited
friendName String
The friend name.
read / writeinherited
hashCode int
The hash code for this object.
read-onlyoverride
isActive bool?
Whether the user is active.
read / writeinherited
isBlockedByMe bool
Whether this sender is blocked by SendbirdChat.currentUser.
final
isCurrentUser bool
isCurrentUser
read-onlyinherited
lastSeenAt int?
The time this User has been last seen at. Zero if this User is online.
read / writeinherited
metaData Map<String, String>
All meta data of the user.
read / writeinherited
nickname String
The nickname of the user.
read / writeinherited
preferredLanguages List<String>?
The preferred languages of the user.
read / writeinherited
profileUrl String
The profile image URL.
read / writeinherited
requireAuth bool
read / writeinherited
role Role
The Role of this sender in the current channel. If the sender's role status changes after the field value allocation, the value returned by this method may not reflect the latest role.
read / write
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
secureProfileUrl String
The profile image URL with auth
read-onlyinherited
userId String
The ID of the user.
read / writeinherited

Methods

copyWith(User other) → void
inherited
createMetaData(Map<String, String> metaDataMap) Future<Map<String, String>>
createMetaData
inherited
deleteAllMetaData() Future<void>
deleteAllMetaData
inherited
deleteMetaData(String key) Future<void>
deleteMetaData
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set(Chat chat) → void
inherited
toJson() Map<String, dynamic>
inherited
toString() String
A string representation of this object.
inherited
updateMetaData(Map<String, String> metaDataMap) Future<Map<String, String>>
updateMetaData
inherited

Operators

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

Static Methods

fromUser(User? user, BaseChannel channel) Sender?