UserModel.fromJson constructor
Creates a UserModel from a JSON response, usually from the auth API.
Implementation
factory UserModel.fromJson(Map<String, dynamic> json) {
return UserModel(email: json['data']?['email'] ?? '', password: '', token: json['token'], userId: json['user']?['_id']);
}