fromMap static method

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

Construct from Map.

Implementation

static InputPassportElementErrorSource? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  switch (_) {
    case 'inputPassportElementErrorSourceSelfie':
      return InputPassportElementErrorSourceSelfie.fromMap(_map);
    case 'inputPassportElementErrorSourceFiles':
      return InputPassportElementErrorSourceFiles.fromMap(_map);
    case 'inputPassportElementErrorSourceUnspecified':
      return InputPassportElementErrorSourceUnspecified.fromMap(_map);
    case 'inputPassportElementErrorSourceReverseSide':
      return InputPassportElementErrorSourceReverseSide.fromMap(_map);
    case 'inputPassportElementErrorSourceFrontSide':
      return InputPassportElementErrorSourceFrontSide.fromMap(_map);
    case 'inputPassportElementErrorSourceTranslationFiles':
      return InputPassportElementErrorSourceTranslationFiles.fromMap(_map);
    case 'inputPassportElementErrorSourceDataField':
      return InputPassportElementErrorSourceDataField.fromMap(_map);
    case 'inputPassportElementErrorSourceTranslationFile':
      return InputPassportElementErrorSourceTranslationFile.fromMap(_map);
    case 'inputPassportElementErrorSourceFile':
      return InputPassportElementErrorSourceFile.fromMap(_map);
    case null:
    default:
      return null;
  }
}