toJson method
Implementation
Map<String, dynamic> toJson() {
final result$data = <String, dynamic>{};
if (_$data.containsKey('email')) {
final l$email = email;
result$data['email'] = l$email;
}
if (_$data.containsKey('username')) {
final l$username = username;
result$data['username'] = l$username;
}
if (_$data.containsKey('phone')) {
final l$phone = phone;
result$data['phone'] = l$phone?.toJson();
}
if (_$data.containsKey('permission')) {
final l$permission = permission;
result$data['permission'] = l$permission;
}
final l$password = password;
result$data['password'] = l$password;
if (_$data.containsKey('picture')) {
final l$picture = picture;
result$data['picture'] = l$picture?.toJson();
}
if (_$data.containsKey('pictures')) {
final l$pictures = pictures;
result$data['pictures'] = l$pictures?.map((e) => e.toJson()).toList();
}
if (_$data.containsKey('covers')) {
final l$covers = covers;
result$data['covers'] = l$covers?.map((e) => e.toJson()).toList();
}
if (_$data.containsKey('firstName')) {
final l$firstName = firstName;
result$data['firstName'] = l$firstName;
}
if (_$data.containsKey('status')) {
final l$status = status;
result$data['status'] =
l$status == null ? null : toJson$Enum$UserStatus(l$status);
}
if (_$data.containsKey('title')) {
final l$title = title;
result$data['title'] = l$title;
}
if (_$data.containsKey('about')) {
final l$about = about;
result$data['about'] = l$about;
}
if (_$data.containsKey('lastName')) {
final l$lastName = lastName;
result$data['lastName'] = l$lastName;
}
if (_$data.containsKey('maritalStatus')) {
final l$maritalStatus = maritalStatus;
result$data['maritalStatus'] = l$maritalStatus == null
? null
: toJson$Enum$MaritalStatus(l$maritalStatus);
}
if (_$data.containsKey('gender')) {
final l$gender = gender;
result$data['gender'] =
l$gender == null ? null : toJson$Enum$Gender(l$gender);
}
if (_$data.containsKey('languages')) {
final l$languages = languages;
result$data['languages'] = l$languages?.map((e) => e).toList();
}
if (_$data.containsKey('education')) {
final l$education = education;
result$data['education'] = l$education?.map((e) => e.toJson()).toList();
}
if (_$data.containsKey('work')) {
final l$work = work;
result$data['work'] = l$work?.map((e) => e.toJson()).toList();
}
if (_$data.containsKey('lived')) {
final l$lived = lived;
result$data['lived'] = l$lived?.map((e) => e).toList();
}
if (_$data.containsKey('hobbies')) {
final l$hobbies = hobbies;
result$data['hobbies'] = l$hobbies?.map((e) => e).toList();
}
if (_$data.containsKey('interests')) {
final l$interests = interests;
result$data['interests'] = l$interests?.map((e) => e).toList();
}
if (_$data.containsKey('isMailValid')) {
final l$isMailValid = isMailValid;
result$data['isMailValid'] = l$isMailValid;
}
if (_$data.containsKey('plugged')) {
final l$plugged = plugged;
result$data['plugged'] = l$plugged;
}
if (_$data.containsKey('dateOfBirth')) {
final l$dateOfBirth = dateOfBirth;
result$data['dateOfBirth'] =
l$dateOfBirth == null ? null : dateTimeToJson(l$dateOfBirth);
}
if (_$data.containsKey('chatContact')) {
final l$chatContact = chatContact;
result$data['chatContact'] =
l$chatContact?.map((e) => e.toJson()).toList();
}
if (_$data.containsKey('socialMedia')) {
final l$socialMedia = socialMedia;
result$data['socialMedia'] =
l$socialMedia?.map((e) => e.toJson()).toList();
}
if (_$data.containsKey('nationality')) {
final l$nationality = nationality;
result$data['nationality'] = l$nationality;
}
if (_$data.containsKey('locale')) {
final l$locale = locale;
result$data['locale'] = l$locale;
}
if (_$data.containsKey('placeOfBirth')) {
final l$placeOfBirth = placeOfBirth;
result$data['placeOfBirth'] = l$placeOfBirth;
}
if (_$data.containsKey('residentialAddress')) {
final l$residentialAddress = residentialAddress;
result$data['residentialAddress'] =
l$residentialAddress?.map((e) => e.toJson()).toList();
}
if (_$data.containsKey('shippingAddress')) {
final l$shippingAddress = shippingAddress;
result$data['shippingAddress'] =
l$shippingAddress?.map((e) => e.toJson()).toList();
}
if (_$data.containsKey('billingAddress')) {
final l$billingAddress = billingAddress;
result$data['billingAddress'] =
l$billingAddress?.map((e) => e.toJson()).toList();
}
if (_$data.containsKey('mobileTheme')) {
final l$mobileTheme = mobileTheme;
result$data['mobileTheme'] = l$mobileTheme == null
? null
: toJson$Enum$MobileThemesEnum(l$mobileTheme);
}
if (_$data.containsKey('source')) {
final l$source = source;
result$data['source'] =
l$source == null ? null : toJson$Enum$SourcesEnum(l$source);
}
if (_$data.containsKey('newsletterSubs')) {
final l$newsletterSubs = newsletterSubs;
result$data['newsletterSubs'] = l$newsletterSubs;
}
if (_$data.containsKey('custom')) {
final l$custom = custom;
result$data['custom'] = l$custom?.map((e) => e.toJson()).toList();
}
final l$roles = roles;
result$data['roles'] = l$roles.map((e) => toJson$Enum$UserRole(e)).toList();
if (_$data.containsKey('apps')) {
final l$apps = apps;
result$data['apps'] = l$apps?.map((e) => toJson$Enum$App(e)).toList();
}
if (_$data.containsKey('phoneNumber')) {
final l$phoneNumber = phoneNumber;
result$data['phoneNumber'] = l$phoneNumber;
}
final l$target = target;
result$data['target'] = l$target.toJson();
if (_$data.containsKey('subject')) {
final l$subject = subject;
result$data['subject'] = l$subject;
}
return result$data;
}