getDocument function
Implementation
Document? getDocument(Map<String, dynamic>? json) {
if (json != null) {
switch (json['type']) {
case "IdentityDocument":
return IdentityDocument.fromJson(json);
case "VehicleRegistrationDocument":
return VehicleRegistrationDocument.fromJson(json);
default:
return null;
}
} else {
return null;
}
}