PassportElementErrorSource.fromJson constructor

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

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();
  }
}