UserInformationDto.fromJson constructor

UserInformationDto.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory UserInformationDto.fromJson(Map<String, dynamic> json) {
  return UserInformationDto(
    id: json["id"] as String,
    email: json["email"] as String?,
    firstname: json["firstname"] as String?,
    lastname: json["lastname"] as String?,
    birthday: json["birthday"] == null
        ? null
        : DateTime.parse(json["birthday"] as String),
    gender: decodeGenderDto(GenderDtoEnumMap, json["gender"] as String),
    isAnonymous: json["isAnonymous"] as bool,
    gmiAccountLinkStatus: decodeAccountLinkStatusDto(
        AccountLinkStatusDtoEnumMap, json["gmiAccountLinkStatus"] as String),
    fileeeAccountIsLinked: json["fileeeAccountIsLinked"] as bool,
    billLimit: json["billLimit"] as int,
    privacyPolicyVersion: json["privacyPolicyVersion"] as String?,
    termsOfServiceVersion: json["termsOfServiceVersion"] as String?,
    imageResource: json["imageResource"] as String?,
    thirdPartySettings: (json["thirdPartySettings"] as List<dynamic>?)
        ?.map(
            (e) => ThirdPartySettingsDto.fromJson(e as Map<String, dynamic>))
        .toList(),
    externalId: json["externalId"] as String?,
  );
}