Sender class

An object represents a sender of a message.

Inheritance
Annotations
  • @JsonSerializable()

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, List<String>? discoveryKeys, Map<String, String> metaData = const {}, bool requireAuth = false})
Sender.fromJson(Map<String, dynamic> json)
factory

Properties

connectionStatus UserConnectionStatus
This user's connection status
getter/setter pairinherited
discoveryKeys List<String>?
getter/setter pairinherited
friendDiscoveryKey String?
getter/setter pairinherited
friendName String?
getter/setter pairinherited
hashCode int
The hash code for this object.
no setteroverride
isActive bool?
True if this user is activated. This property is changed by the Platform API
getter/setter pairinherited
isBlockedByMe bool
True if current user blocked this sender
final
isCurrentUser bool
no setterinherited
lastSeenAt int?
The lastest time when the user became offline
getter/setter pairinherited
metaData Map<String, String>
getter/setter pairinherited
nickname String
User nickname
getter/setter pairinherited
preferredLanguages List<String>?
User's preferred language. Used for translating messages.
getter/setter pairinherited
profileUrl String?
Profile image url
getter/setter pairinherited
requireAuth bool
getter/setter pairinherited
role Role
Role of this sender in the channel
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secureProfileUrl String?
Profile image url with auth
no setterinherited
sessionToken String?
getter/setter pairinherited
userId String
User ID. This has to be unique
getter/setter pairinherited

Methods

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

Operators

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

Static Methods

fromUser(User? user, BaseChannel channel) Sender?