VisibleSecurityState.fromJson constructor

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

Implementation

factory VisibleSecurityState.fromJson(Map<String, dynamic> json) {
  return VisibleSecurityState(
    securityState: SecurityState.fromJson(json['securityState'] as String),
    certificateSecurityState: json.containsKey('certificateSecurityState')
        ? CertificateSecurityState.fromJson(
            json['certificateSecurityState'] as Map<String, dynamic>)
        : null,
    safetyTipInfo: json.containsKey('safetyTipInfo')
        ? SafetyTipInfo.fromJson(
            json['safetyTipInfo'] as Map<String, dynamic>)
        : null,
    securityStateIssueIds: (json['securityStateIssueIds'] as List)
        .map((e) => e as String)
        .toList(),
  );
}