User class

Represents a user in the chat system

Constructors

User({required String uid, required String displayName, required String email, String? photoUrl, DateTime? lastSeen})
const
User.fromFirestore(DocumentSnapshot<Object?> doc)
Creates a User instance from Firebase document data
factory
User.fromMap(Map<String, dynamic> map, String uid)
Creates a User instance from a Map
factory

Properties

displayName String
final
email String
final
hashCode int
The hash code for this object.
no setteroverride
lastSeen DateTime?
final
photoUrl String?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uid String
final

Methods

copyWith({String? uid, String? displayName, String? email, String? photoUrl, DateTime? lastSeen}) User
Creates a copy of User with updated fields
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, dynamic>
Converts User instance to Map for Firestore storage
toString() String
A string representation of this object.
override

Operators

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