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
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