fromMap static method

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

Construct from Map.

Implementation

static PassportElementErrorSource? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  switch (_) {
    case 'passportElementErrorSourceDataField':
      return PassportElementErrorSourceDataField.fromMap(_map);
    case 'passportElementErrorSourceFile':
      return PassportElementErrorSourceFile.fromMap(_map);
    case 'passportElementErrorSourceReverseSide':
      return PassportElementErrorSourceReverseSide.fromMap(_map);
    case 'passportElementErrorSourceUnspecified':
      return PassportElementErrorSourceUnspecified.fromMap(_map);
    case 'passportElementErrorSourceTranslationFiles':
      return PassportElementErrorSourceTranslationFiles.fromMap(_map);
    case 'passportElementErrorSourceFiles':
      return PassportElementErrorSourceFiles.fromMap(_map);
    case 'passportElementErrorSourceTranslationFile':
      return PassportElementErrorSourceTranslationFile.fromMap(_map);
    case 'passportElementErrorSourceFrontSide':
      return PassportElementErrorSourceFrontSide.fromMap(_map);
    case 'passportElementErrorSourceSelfie':
      return PassportElementErrorSourceSelfie.fromMap(_map);
    case null:
    default:
      return null;
  }
}