ChatlistsChatlistInvite.deserialize constructor
ChatlistsChatlistInvite.deserialize(
- BinaryReader reader
Deserialize.
Implementation
factory ChatlistsChatlistInvite.deserialize(BinaryReader reader) {
// Read [ChatlistsChatlistInvite] fields.
final flags = reader.readInt32();
final titleNoanimate = (flags & 2) != 0;
final title = reader.readObject() as TextWithEntitiesBase;
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(
titleNoanimate: titleNoanimate,
title: title,
emoticon: emoticon,
peers: peers.items,
chats: chats.items,
users: users.items,
);
// Now return the deserialized [ChatlistsChatlistInvite].
return returnValue;
}