fromMap static method

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

Construct from Map.

Implementation

static PassportSuitableElement? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  if (_ != CONSTRUCTOR) return null;
  var extra = _map['@extra'];
  var clientId = _map['@clientId'];
  var type = PassportElementType.fromMap(_map['type'])!;
  var is_selfie_required = _map['is_selfie_required']! as bool;
  var is_translation_required = _map['is_translation_required']! as bool;
  var is_native_name_required = _map['is_native_name_required']! as bool;
  return PassportSuitableElement(
    extra: extra,
    clientId: clientId,
    type: type,
    is_selfie_required: is_selfie_required,
    is_translation_required: is_translation_required,
    is_native_name_required: is_native_name_required,
  );
}