fromMap static method

PassportElementType? fromMap(
  1. Map<String, dynamic>? _map
)
override

Construct from Map.

Implementation

static PassportElementType? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  switch (_) {
    case 'passportElementTypePhoneNumber':
      return PassportElementTypePhoneNumber.fromMap(_map);
    case 'passportElementTypeUtilityBill':
      return PassportElementTypeUtilityBill.fromMap(_map);
    case 'passportElementTypeAddress':
      return PassportElementTypeAddress.fromMap(_map);
    case 'passportElementTypePassportRegistration':
      return PassportElementTypePassportRegistration.fromMap(_map);
    case 'passportElementTypeRentalAgreement':
      return PassportElementTypeRentalAgreement.fromMap(_map);
    case 'passportElementTypeEmailAddress':
      return PassportElementTypeEmailAddress.fromMap(_map);
    case 'passportElementTypeBankStatement':
      return PassportElementTypeBankStatement.fromMap(_map);
    case 'passportElementTypeDriverLicense':
      return PassportElementTypeDriverLicense.fromMap(_map);
    case 'passportElementTypeInternalPassport':
      return PassportElementTypeInternalPassport.fromMap(_map);
    case 'passportElementTypePassport':
      return PassportElementTypePassport.fromMap(_map);
    case 'passportElementTypePersonalDetails':
      return PassportElementTypePersonalDetails.fromMap(_map);
    case 'passportElementTypeTemporaryRegistration':
      return PassportElementTypeTemporaryRegistration.fromMap(_map);
    case 'passportElementTypeIdentityCard':
      return PassportElementTypeIdentityCard.fromMap(_map);
    case null:
    default:
      return null;
  }
}