IdentityDocument.fromJson constructor
Parse from a json
Implementation
factory IdentityDocument.fromJson(Map<String, dynamic> json) =>
IdentityDocument(
number: json['number'],
expirationDate: json['expiration_date'] == null
? null
: Date.fromJson(json['expiration_date']),
frontSide: DatedFile.fromJson(json['front_side']),
reverseSide: json['reverse_side'] == null
? null
: DatedFile.fromJson(json['reverse_side']),
selfie:
json['selfie'] == null ? null : DatedFile.fromJson(json['selfie']),
translation: List<DatedFile>.from((json['translation'] ?? [])
.map((item) => DatedFile.fromJson(item))
.toList()),
);