UserProfile.fromJson constructor
UserProfile.fromJson(
- Map<String, dynamic> json
)
Implementation
factory UserProfile.fromJson(final Map<String, dynamic> json) => UserProfile(
uuid: json["uuid"] as String?,
createdTs: json["createdTS"] as String?,
updatedTs: json["updatedTS"] as String?,
createdBy: json["createdBy"] as String?,
updatedBy: json["updatedBy"] as String?,
version: json["version"] as int?,
id: json["id"] as String?,
extProfileImgUrl: json["extProfileImgUrl"] as String?,
media: json["media"] == null
? null
: CoverMedia.fromJson(json["media"] as Map<String, dynamic>),
firstName: json["firstName"] as String?,
lastName: json["lastName"] as String?,
gender: json["gender"] as int?,
yob: json["yob"] as int?,
authProviders: json["authProviders"] == null
? null
: List<AuthProvider>.from(json["authProviders"].map((final x) =>
AuthProvider.fromJson(x as Map<String, dynamic>))
as Iterable<dynamic>),
homeLocation: json["homeLocation"] == null
? null
: HomeLocation.fromJson(
json["homeLocation"] as Map<String, dynamic>),
contactPoints: json["contactPoints"] == null
? null
: List<ContactPoint>.from(json["contactPoints"].map((final x) =>
ContactPoint.fromJson(x as Map<String, dynamic>))
as Iterable<dynamic>),
premiumUntilTs: json["premiumUntilTS"] as String?,
type: json["type"] as String?,
metadata: json["metadata"] == null
? null
: UserProfileMetadata.fromJson(
json["metadata"] as Map<String, dynamic>),
registeredTs: json["registeredTS"] as String?,
devices: json["devices"] == null
? null
: List<Device>.from(json["devices"].map(
(final x) => Device.fromJson(x as Map<String, dynamic>))
as Iterable<dynamic>),
userCommunities: json["userCommunities"] == null
? null
: List<UserCommunit>.from(json["userCommunities"].map((final x) =>
UserCommunit.fromJson(x as Map<String, dynamic>))
as Iterable<dynamic>),
userCommunitiesNegative: json["userCommunitiesNegative"] == null
? null
: List<UserCommunit>.from(json["userCommunitiesNegative"].map(
(final x) =>
UserCommunit.fromJson(x as Map<String, dynamic>))
as Iterable<dynamic>),
policyAcceptances: json["policyAcceptances"] == null
? null
: List<PolicyAcceptance>.from(json["policyAcceptances"].map(
(final x) =>
PolicyAcceptance.fromJson(x as Map<String, dynamic>))
as Iterable<dynamic>),
active: json["active"] as bool?,
);