UserModel class

Represents a user in the application with profile information.

Stores user details such as ID, email, name, user type, and optional fields like phone number, address, farm name, and farm location.

Constructors

UserModel({required String uid, required String email, required String fullName, required UserType userType, String? phoneNumber, String? address, String? farmName, String? farmLocation})
Creates a UserModel instance with required and optional user details.
UserModel.fromMap(Map<String, dynamic> map)
Creates a UserModel from a Firestore document map.
factory

Properties

address String?
final
email String
final
farmLocation String?
final
farmName String?
final
fullName String
final
hashCode int
The hash code for this object.
no setterinherited
phoneNumber String?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uid String
final
userType UserType
final

Methods

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

Operators

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