User.fromJson constructor

User.fromJson(
  1. Map<String, dynamic> json
)

Implementation

User.fromJson(Map<String, dynamic> json) {
  id = json['id'] as int?;
  name = json['name'] as String?;
  phoneNumber = json['phone_number'] as String?;
  email = json['email'] as String?;
  dateOfBirth = json['date_of_birth'] as String?;
  gender = json['gender'] as String?;
  insuranceId = json['insurance_id'] as String?;
  policyNumber = json['policy_number'] as String?;
  nationalityNumber = json['nationality_number'] as String?;
  height = json['height'] as int?;
  weight = json['weight'] as int?;
  bloodType = json['blood_type'] as String?;
  smoker = json['smoker'] as String?;
  alcoholic = json['alcoholic'] as String?;
  maritalStatus = json['marital_status'] as String?;
  relationType = json['relation_type'] as String?;
  createdAt = json['created_at'] as String?;
  updatedAt = json['updated_at'] as String?;
}