Account.fromJson constructor

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

Implementation

factory Account.fromJson(Map<String, dynamic> json) {
  return Account(
    accountId: json['accountId'] as String,
    email: json['email'] as String,
    name: json['name'] as String,
    givenName: json['givenName'] as String,
    pictureUrl: json['pictureUrl'] as String,
    idpConfigUrl: json['idpConfigUrl'] as String,
    idpLoginUrl: json['idpLoginUrl'] as String,
    loginState: LoginState.fromJson(json['loginState'] as String),
    termsOfServiceUrl: json.containsKey('termsOfServiceUrl')
        ? json['termsOfServiceUrl'] as String
        : null,
    privacyPolicyUrl: json.containsKey('privacyPolicyUrl')
        ? json['privacyPolicyUrl'] as String
        : null,
  );
}