User.fromJson constructor

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

Implementation

factory User.fromJson(Map<String, dynamic> json) =>
    User(
      id: json["id"],
      firstName: json["first_name"],
      lastName: json["last_name"],
      fullName: json["full_name"],
      email: json["email"],
      latitude: json["latitude"],
      longitude: json["longitude"],
      address: json["address"],
      country: json["country"],
      state: json["state"],
      city: json["city"],
      contactNumber: json["contact_number"],
      accountType: json["account_type"],
      userType: json["user_type"],
      dob: json["dob"],
      gender: json["gender"],
      businessIds: json["business_ids"] == null
          ? []
          : List<int>.from(json["business_ids"]!.map((x) => x)),
      interestIds: json["interest_ids"] == null
          ? []
          : List<int>.from(json["interest_ids"]!.map((x) => x)),
      status: json["status"],
      timeZone: json["time_zone"],
      emailVerifiedAt: json["email_verified_at"],
      loginType: json["login_type"],
      uid: json["uid"],
      socialImage: json["social_image"],
      otp: json["otp"],
      profileImage: json["profile_image"],
    );