fromMap static method

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

Construct from Map.

Implementation

static ToggleSupergroupJoinByRequest? 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 supergroup_id = _map['supergroup_id']! as int;
  var join_by_request = _map['join_by_request']! as bool;
  return ToggleSupergroupJoinByRequest(
    extra: extra,
    clientId: clientId,
    supergroup_id: supergroup_id,
    join_by_request: join_by_request,
  );
}