UserData.fromJson constructor
UserData.fromJson(- Map<String, dynamic> json
)
Implementation
factory UserData.fromJson(Map<String, dynamic> json) {
return UserData(
address: json['address'],
apiToken: json['api_token'],
cityId: json['city_id'],
contactNumber: json['contact_number'],
countryId: json['country_id'],
createdAt: json['created_at'],
displayName: json['display_name'],
email: json['email'],
emailVerifiedAt: json['email_verified_at'],
firstName: json['first_name'],
id: json['id'].toString().toInt(),
isFeatured: json['is_featured'],
lastName: json['last_name'],
socialImage: json['social_image'],
providerId: json['provider_id'],
//providertype_id: json['providertype_id'],
stateId: json['state_id'],
status: json['status'],
updatedAt: json['updated_at'],
userRole: json['user_role'] != null ? new List<String>.from(json['user_role']) : null,
userType: json['user_type'],
username: json['username'],
isOnline: json['isOnline'],
profileImage: json['profile_image'],
uid: json['uid'],
password: json['password'],
isFavourite: json['is_favourite'],
description: json['description'],
knownLanguages: json['known_languages'],
whyChooseMe: json['why_choose_me'],
skills: json['skills'],
providerType: json['providertype'],
cityName: json['city_name'],
loginType: json['login_type'],
serviceAddressId: json['service_address_id'],
lastNotificationSeen: json['last_notification_seen'],
providersServiceRating: json['providers_service_rating'],
handymanRating: json['handyman_rating'],
handymanReview: json['handyman_review'] != null ? new HandymanReview.fromJson(json['handyman_review']) : null,
timeZone: json['time_zone'],
isVerifyProvider: json['is_verify_provider'],
isUserExist: json['is_user_exist'],
verificationId: json['verificationId'],
designation: json['designation'],
otpCode: json['otpCode'],
totalBooking: json['total_services_booked'],
emailVerified: json['is_email_verified'],
);
}