fromMap static method

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

Construct from Map.

Implementation

static SendPassportAuthorizationForm? 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 authorization_form_id = _map['authorization_form_id']! as int;
  var types = List<PassportElementType>.from(
    (_map["types"] ?? []).map(
      (e) => PassportElementType.fromMap(e),
    ),
  );
  return SendPassportAuthorizationForm(
    extra: extra,
    clientId: clientId,
    authorization_form_id: authorization_form_id,
    types: types,
  );
}