UserModel constructor

UserModel({
  1. required String uid,
  2. required String email,
  3. required String fullName,
  4. required UserType userType,
  5. String? phoneNumber,
  6. String? address,
  7. String? farmName,
  8. String? farmLocation,
})

Creates a UserModel instance with required and optional user details.

Parameters:

  • uid: The unique identifier of the user.
  • email: The user's email address.
  • fullName: The user's full name.
  • userType: The type of user (farmer or consumer).
  • phoneNumber: The user's phone number (optional).
  • address: The user's address (optional).
  • farmName: The name of the user's farm (optional, typically for farmers).
  • farmLocation: The location of the user's farm (optional, typically for farmers).

Implementation

UserModel({
  required this.uid,
  required this.email,
  required this.fullName,
  required this.userType,
  this.phoneNumber,
  this.address,
  this.farmName,
  this.farmLocation,
});