InputPassportElement.fromJson constructor

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

Implementation

factory InputPassportElement.fromJson(Map<String, dynamic> json)  {
  switch(json["@type"]) {
    case InputPassportElementPersonalDetails.CONSTRUCTOR:
      return InputPassportElementPersonalDetails.fromJson(json);
    case InputPassportElementPassport.CONSTRUCTOR:
      return InputPassportElementPassport.fromJson(json);
    case InputPassportElementDriverLicense.CONSTRUCTOR:
      return InputPassportElementDriverLicense.fromJson(json);
    case InputPassportElementIdentityCard.CONSTRUCTOR:
      return InputPassportElementIdentityCard.fromJson(json);
    case InputPassportElementInternalPassport.CONSTRUCTOR:
      return InputPassportElementInternalPassport.fromJson(json);
    case InputPassportElementAddress.CONSTRUCTOR:
      return InputPassportElementAddress.fromJson(json);
    case InputPassportElementUtilityBill.CONSTRUCTOR:
      return InputPassportElementUtilityBill.fromJson(json);
    case InputPassportElementBankStatement.CONSTRUCTOR:
      return InputPassportElementBankStatement.fromJson(json);
    case InputPassportElementRentalAgreement.CONSTRUCTOR:
      return InputPassportElementRentalAgreement.fromJson(json);
    case InputPassportElementPassportRegistration.CONSTRUCTOR:
      return InputPassportElementPassportRegistration.fromJson(json);
    case InputPassportElementTemporaryRegistration.CONSTRUCTOR:
      return InputPassportElementTemporaryRegistration.fromJson(json);
    case InputPassportElementPhoneNumber.CONSTRUCTOR:
      return InputPassportElementPhoneNumber.fromJson(json);
    case InputPassportElementEmailAddress.CONSTRUCTOR:
      return InputPassportElementEmailAddress.fromJson(json);
    default:
      return const InputPassportElement();
  }
}