User class

User model representing a user in the chat system.

Constructors

User.new({required String userId, required String name, required String role, String? firebaseToken})
Creates a new User instance.
User.fromMap(Map<String, dynamic> map)
Convert Firestore document to User.
factory

Properties

firebaseToken String?
Firebase token for push notifications.
final
hashCode int
The hash code for this object.
no setterinherited
name String
Name of the user.
final
role String
Role of the user (e.g., "customer" or "nutritionist").
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
userId String
Unique user identifier.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, dynamic>
Convert User to a Map for Firestore storage.
toString() String
A string representation of this object.
inherited

Operators

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