Sender class
Represents a sender.
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
-
getter/setter pairinherited
- connectionStatus ↔ UserConnectionStatus
-
The user connection status type.
getter/setter pairinherited
- friendDiscoveryKey ↔ String
-
Represents friend discovery key.
getter/setter pairinherited
- friendName ↔ String
-
The friend name.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setteroverride
- isActive ↔ bool?
-
Whether the user is active.
getter/setter pairinherited
- isBlockedByMe ↔ bool
-
Whether this sender is blocked by SendbirdChat.currentUser.
getter/setter pair
- isCurrentUser → bool
-
isCurrentUser
no setterinherited
- lastSeenAt ↔ int?
-
The time this User has been last seen at. Zero if this User is online.
getter/setter pairinherited
-
metaData
↔ Map<
String, String> -
All meta data of the user.
getter/setter pairinherited
- nickname ↔ String
-
The nickname of the user.
getter/setter pairinherited
-
preferredLanguages
↔ List<
String> ? -
The preferred languages of the user.
getter/setter pairinherited
- profileUrl ↔ String
-
The profile image URL.
getter/setter pairinherited
- requireAuth ↔ bool
-
getter/setter pairinherited
- 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.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secureProfileUrl → String
-
The profile image URL with auth
no setterinherited
- userId ↔ String
-
The ID of the user.
getter/setter pairinherited
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?