UserModel class

Constructors

UserModel.new({String? id, required String email, String? password, required String userName, required String fullName, Timestamp? createdAt, Timestamp? updatedAt, String? fitnessLevel, int? completedExercises, String? profilePicture, String? role})
Constructor
const
UserModel.fromSnapshot(DocumentSnapshot<Map<String, dynamic>> document)
Map Json oriented document snapshot from Firebase to UserModel
factory

Properties

completedExercises int?
final
createdAt Timestamp?
final
email String
final
fitnessLevel String?
final
fullName String
final
hashCode int
The hash code for this object.
no setterinherited
id String?
final
password String?
Password should not be stored in the database. Authentication will handle login logout for us. So just use this variable to get data from user and pass it to authentication.
final
profilePicture String?
final
role String?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
updatedAt Timestamp?
final
userName String
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
convert model to Json structure so that you can use it to store data in Firebase
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

empty() UserModel
Empty Constructor for UserModel