User class

Represents a user within the chat.

This class extends AppEntity and adds additional properties specifically related to a user, such as the uid, name, avatar, link, status etc.

Inheritance
Implementers

Constructors

User({String uid = "", required String name, String? avatar, String? link, String? role, String? status, String? statusMessage, DateTime? lastActiveAt, List<String>? tags, Map<String, dynamic>? metadata, bool? hasBlockedMe, bool? blockedByMe})
Constructs a new User instance.
User.fromMap(dynamic map)
Creates a new User instance from a map.
factory
User.fromUID({required String uid, required String name, String? avatar = '', String? link = '', String? role = 'default', String? status = 'offline', String? statusMessage = '', DateTime? lastActiveAt, List<String>? tags = const [], Map<String, dynamic>? metadata = const {}, bool? hasBlockedMe = false, bool? blockedByMe = false})
Constructs a new User instance from a provided UID.

Properties

avatar String?
getter/setter pair
blockedByMe bool?
getter/setter pair
hasBlockedMe bool?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
lastActiveAt DateTime?
getter/setter pair
getter/setter pair
metadata Map<String, dynamic>?
getter/setter pair
name String
getter/setter pair
role String?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status String?
getter/setter pair
statusMessage String?
getter/setter pair
tags List<String>?
getter/setter pair
uid String
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Generates a map representing the User.
toMap() Map<String, dynamic>
Generates a map representing the User.
toString() String
Generates a string representation of the User.
override

Operators

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