fromMap static method

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

Construct from Map.

Implementation

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