fromMap static method

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

Construct from Map.

Implementation

static ChatInviteLink? 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 invite_link = _map['invite_link']! as String;
  var name = _map['name']! as String;
  var creator_user_id = _map['creator_user_id']! as int;
  var date = _map['date']! as int;
  var edit_date = _map['edit_date']! as int;
  var expiration_date = _map['expiration_date']! as int;
  var member_limit = _map['member_limit']! as int;
  var member_count = _map['member_count']! as int;
  var pending_join_request_count = _map['pending_join_request_count']! as int;
  var creates_join_request = _map['creates_join_request']! as bool;
  var is_primary = _map['is_primary']! as bool;
  var is_revoked = _map['is_revoked']! as bool;
  return ChatInviteLink(
    extra: extra,
    clientId: clientId,
    invite_link: invite_link,
    name: name,
    creator_user_id: creator_user_id,
    date: date,
    edit_date: edit_date,
    expiration_date: expiration_date,
    member_limit: member_limit,
    member_count: member_count,
    pending_join_request_count: pending_join_request_count,
    creates_join_request: creates_join_request,
    is_primary: is_primary,
    is_revoked: is_revoked,
  );
}