PassportElementErrorSource.fromJson constructor
a PassportElementErrorSource return type can be :
- PassportElementErrorSourceUnspecified
- PassportElementErrorSourceDataField
- PassportElementErrorSourceFrontSide
- PassportElementErrorSourceReverseSide
- PassportElementErrorSourceSelfie
- PassportElementErrorSourceTranslationFile
- PassportElementErrorSourceTranslationFiles
- PassportElementErrorSourceFile
- PassportElementErrorSourceFiles
Implementation
factory PassportElementErrorSource.fromJson(Map<String, dynamic> json) {
switch(json["@type"]) {
case PassportElementErrorSourceUnspecified.CONSTRUCTOR:
return PassportElementErrorSourceUnspecified.fromJson(json);
case PassportElementErrorSourceDataField.CONSTRUCTOR:
return PassportElementErrorSourceDataField.fromJson(json);
case PassportElementErrorSourceFrontSide.CONSTRUCTOR:
return PassportElementErrorSourceFrontSide.fromJson(json);
case PassportElementErrorSourceReverseSide.CONSTRUCTOR:
return PassportElementErrorSourceReverseSide.fromJson(json);
case PassportElementErrorSourceSelfie.CONSTRUCTOR:
return PassportElementErrorSourceSelfie.fromJson(json);
case PassportElementErrorSourceTranslationFile.CONSTRUCTOR:
return PassportElementErrorSourceTranslationFile.fromJson(json);
case PassportElementErrorSourceTranslationFiles.CONSTRUCTOR:
return PassportElementErrorSourceTranslationFiles.fromJson(json);
case PassportElementErrorSourceFile.CONSTRUCTOR:
return PassportElementErrorSourceFile.fromJson(json);
case PassportElementErrorSourceFiles.CONSTRUCTOR:
return PassportElementErrorSourceFiles.fromJson(json);
default:
return const PassportElementErrorSource();
}
}