188 lines
5.1 KiB
Dart
188 lines
5.1 KiB
Dart
import 'dart:convert';
|
|
|
|
UserDetailsResponseModel userDetailsResponseModelFromJson(String str) =>
|
|
UserDetailsResponseModel.fromJson(json.decode(str));
|
|
|
|
String userDetailsResponseModelToJson(UserDetailsResponseModel data) =>
|
|
json.encode(data.toJson());
|
|
|
|
class UserDetailsResponseModel {
|
|
bool? isSuccess;
|
|
int? statusCode;
|
|
String? message;
|
|
Data? data;
|
|
dynamic errors;
|
|
|
|
UserDetailsResponseModel({
|
|
this.isSuccess,
|
|
this.statusCode,
|
|
this.message,
|
|
this.data,
|
|
this.errors,
|
|
});
|
|
|
|
factory UserDetailsResponseModel.fromJson(Map<String, dynamic> json) =>
|
|
UserDetailsResponseModel(
|
|
isSuccess: json["isSuccess"],
|
|
statusCode: json["statusCode"],
|
|
message: json["message"],
|
|
data: json["data"] == null ? null : Data.fromJson(json["data"]),
|
|
errors: json["errors"],
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
"isSuccess": isSuccess,
|
|
"statusCode": statusCode,
|
|
"message": message,
|
|
"data": data?.toJson(),
|
|
"errors": errors,
|
|
};
|
|
}
|
|
|
|
class Data {
|
|
String? userId;
|
|
String? fullName;
|
|
String? firstName;
|
|
String? lastName;
|
|
String? userName;
|
|
String? displayName;
|
|
String? email;
|
|
String? phoneNumber;
|
|
int? userTypeId;
|
|
String? userTypeName;
|
|
String? profilePicture;
|
|
DateTime? dateOfBirth;
|
|
String? gender;
|
|
String? countryCode;
|
|
int? countryId;
|
|
int? stateId;
|
|
int? cityId;
|
|
bool? isActive;
|
|
bool? isDeleted;
|
|
dynamic fitnessLevel;
|
|
dynamic coachFitnessCategory;
|
|
String? privacySettings;
|
|
dynamic facebookSocialLink;
|
|
dynamic instagramSocialLink;
|
|
dynamic linkedInSocialLink;
|
|
dynamic twitterSocialLink;
|
|
dynamic aboutMe;
|
|
bool? isUpdateUserProfile;
|
|
bool? isUpdateUserInformation;
|
|
String? userProfilePic;
|
|
String? userProfilePicType;
|
|
String? becomeCoachStatus;
|
|
String? loginType;
|
|
|
|
Data({
|
|
this.userId,
|
|
this.fullName,
|
|
this.firstName,
|
|
this.lastName,
|
|
this.userName,
|
|
this.displayName,
|
|
this.email,
|
|
this.phoneNumber,
|
|
this.userTypeId,
|
|
this.userTypeName,
|
|
this.profilePicture,
|
|
this.dateOfBirth,
|
|
this.gender,
|
|
this.countryCode,
|
|
this.countryId,
|
|
this.stateId,
|
|
this.cityId,
|
|
this.isActive,
|
|
this.isDeleted,
|
|
this.fitnessLevel,
|
|
this.coachFitnessCategory,
|
|
this.privacySettings,
|
|
this.facebookSocialLink,
|
|
this.instagramSocialLink,
|
|
this.linkedInSocialLink,
|
|
this.twitterSocialLink,
|
|
this.aboutMe,
|
|
this.isUpdateUserProfile,
|
|
this.isUpdateUserInformation,
|
|
this.userProfilePic,
|
|
this.userProfilePicType,
|
|
this.becomeCoachStatus,
|
|
this.loginType,
|
|
});
|
|
|
|
factory Data.fromJson(Map<String, dynamic> json) => Data(
|
|
userId: json["userID"],
|
|
fullName: json["fullName"],
|
|
firstName: json["firstName"],
|
|
lastName: json["lastName"],
|
|
userName: json["userName"],
|
|
displayName: json["displayName"],
|
|
email: json["email"],
|
|
phoneNumber: json["phoneNumber"],
|
|
userTypeId: json["userTypeId"],
|
|
userTypeName: json["userTypeName"],
|
|
profilePicture: json["profilePicture"],
|
|
dateOfBirth:
|
|
json["dateOfBirth"] == null
|
|
? null
|
|
: DateTime.parse(json["dateOfBirth"]),
|
|
gender: json["gender"],
|
|
countryCode: json["countryCode"],
|
|
countryId: json["countryID"],
|
|
stateId: json["stateID"],
|
|
cityId: json["cityID"],
|
|
isActive: json["isActive"],
|
|
isDeleted: json["isDeleted"],
|
|
fitnessLevel: json["fitnessLevel"],
|
|
coachFitnessCategory: json["coachFitnessCategory"],
|
|
privacySettings: json["privacySettings"],
|
|
facebookSocialLink: json["facebookSocialLink"],
|
|
instagramSocialLink: json["instagramSocialLink"],
|
|
linkedInSocialLink: json["linkedInSocialLink"],
|
|
twitterSocialLink: json["twitterSocialLink"],
|
|
aboutMe: json["aboutMe"],
|
|
isUpdateUserProfile: json["isUpdateUserProfile"],
|
|
isUpdateUserInformation: json["isUpdateUserInformation"],
|
|
userProfilePic: json["userProfilePic"],
|
|
userProfilePicType: json["userProfilePicType"],
|
|
becomeCoachStatus: json["becomeCoachStatus"],
|
|
loginType: json["loginType"],
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
"userID": userId,
|
|
"fullName": fullName,
|
|
"firstName": firstName,
|
|
"lastName": lastName,
|
|
"userName": userName,
|
|
"displayName": displayName,
|
|
"email": email,
|
|
"phoneNumber": phoneNumber,
|
|
"userTypeId": userTypeId,
|
|
"userTypeName": userTypeName,
|
|
"profilePicture": profilePicture,
|
|
"dateOfBirth": dateOfBirth?.toIso8601String(),
|
|
"gender": gender,
|
|
"countryCode": countryCode,
|
|
"countryID": countryId,
|
|
"stateID": stateId,
|
|
"cityID": cityId,
|
|
"isActive": isActive,
|
|
"isDeleted": isDeleted,
|
|
"fitnessLevel": fitnessLevel,
|
|
"coachFitnessCategory": coachFitnessCategory,
|
|
"privacySettings": privacySettings,
|
|
"facebookSocialLink": facebookSocialLink,
|
|
"instagramSocialLink": instagramSocialLink,
|
|
"linkedInSocialLink": linkedInSocialLink,
|
|
"twitterSocialLink": twitterSocialLink,
|
|
"aboutMe": aboutMe,
|
|
"isUpdateUserProfile": isUpdateUserProfile,
|
|
"isUpdateUserInformation": isUpdateUserInformation,
|
|
"userProfilePic": userProfilePic,
|
|
"userProfilePicType": userProfilePicType,
|
|
"becomeCoachStatus": becomeCoachStatus,
|
|
"loginType": loginType,
|
|
};
|
|
}
|