UserData.fromJson constructor
UserData.fromJson(- Map<String, dynamic> json
)
Implementation
factory UserData.fromJson(Map<String, dynamic> json) => UserData(
id: json["id"],
firstName: json["first_name"],
lastName: json["last_name"],
fullName: json["full_name"],
updatedAt: json["updated_at"],
homeTown: json["hometown"],
displayName: json['display_name'],
userName: json["username"],
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"],
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)),
musicTypeIds: json["music_type_ids"] == null ? [] : List<int>.from(json["music_type_ids"]!.map((x) => x)),
status: json["status"],
timeZone: json["time_zone"],
lastNotificationSeen: json["last_notification_seen"],
emailVerifiedAt: json["email_verified_at"],
loginType: json["login_type"],
uid: json["uid"],
socialImage: json["social_image"],
isOnline: json["is_online"],
lastOnlineTime: json["last_online_time"],
otp: json["otp"],
rememberToken: json["remember_token"],
profileImage: json["profile_image"],
password: json["password"],
passwordConfirmation: json["password_confirmation"],
dob: json["dob"],
apiToken: json["api_token"],
aboutMe: json["about_me"],
gender: json["gender"],
relationShipStatus: json["relationship_status"],
followers: json["followers"],
following: json["following"],
totalReview: json["total_reviews"],
createdAt: json["created_at"],
isPrivateAccount: json["is_private_account"],
hideFromSearch: json["hide_from_search"],
hideEvents: json["hide_events"],
msgOff: json["msg_off"],
isProUser: json["is_pro_user"],
totalClaimBusiness: json["total_claim_business"],
completeProfile: json["complete_profile"],
socialMediaUrl: json["social_media_url"] == null
? null
: SocialMediaUrl.fromJson(json["social_media_url"]),
);