User class

Represents a user.

Implementers
Annotations

Constructors

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

Properties

chat ↔ Chat
read / write
connectionStatus UserConnectionStatus
The user connection status type.
read / write
friendDiscoveryKey String
Represents friend discovery key.
read / write
friendName String
The friend name.
read / write
hashCode int
The hash code for this object.
read-onlyoverride
isActive bool?
Whether the user is active.
read / write
isCurrentUser bool
isCurrentUser
read-only
lastSeenAt int?
The time this User has been last seen at. Zero if this User is online.
read / write
metaData Map<String, String>
All meta data of the user.
read / write
nickname String
The nickname of the user.
read / write
preferredLanguages List<String>?
The preferred languages of the user.
read / write
profileUrl String
The profile image URL.
read / write
requireAuth bool
read / write
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
secureProfileUrl String
The profile image URL with auth
read-only
userId String
The ID of the user.
read / write

Methods

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

Operators

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