fromMap static method

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

Construct from Map.

Implementation

static ChatFolderInviteLinkInfo? 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 chat_folder_info = ChatFolderInfo.fromMap(_map['chat_folder_info'])!;
  var missing_chat_ids = List<int>.from(
    (_map["missing_chat_ids"] ?? []).map(
      (e) => e as int,
    ),
  );
  var added_chat_ids = List<int>.from(
    (_map["added_chat_ids"] ?? []).map(
      (e) => e as int,
    ),
  );
  return ChatFolderInviteLinkInfo(
    extra: extra,
    clientId: clientId,
    chat_folder_info: chat_folder_info,
    missing_chat_ids: missing_chat_ids,
    added_chat_ids: added_chat_ids,
  );
}