ChatlistsChatlistInvite.deserialize constructor

ChatlistsChatlistInvite.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory ChatlistsChatlistInvite.deserialize(BinaryReader reader) {
  // Read [ChatlistsChatlistInvite] fields.
  final flags = reader.readInt32();
  final title = reader.readString();
  final hasEmoticonField = (flags & 1) != 0;
  final emoticon = hasEmoticonField ? reader.readString() : null;
  final peers = reader.readVectorObject<PeerBase>();
  final chats = reader.readVectorObject<ChatBase>();
  final users = reader.readVectorObject<UserBase>();

  // Construct [ChatlistsChatlistInvite] object.
  final returnValue = ChatlistsChatlistInvite(
    title: title,
    emoticon: emoticon,
    peers: peers,
    chats: chats,
    users: users,
  );

  // Now return the deserialized [ChatlistsChatlistInvite].
  return returnValue;
}