ContactsGetTopPeers.deserialize constructor
ContactsGetTopPeers.deserialize(
- BinaryReader reader
Deserialize.
Implementation
factory ContactsGetTopPeers.deserialize(BinaryReader reader) {
// Read [ContactsGetTopPeers] fields.
final flags = reader.readInt32();
final correspondents = (flags & 1) != 0;
final botsPm = (flags & 2) != 0;
final botsInline = (flags & 4) != 0;
final phoneCalls = (flags & 8) != 0;
final forwardUsers = (flags & 16) != 0;
final forwardChats = (flags & 32) != 0;
final groups = (flags & 1024) != 0;
final channels = (flags & 32768) != 0;
final offset = reader.readInt32();
final limit = reader.readInt32();
final hash = reader.readInt64();
// Construct [ContactsGetTopPeers] object.
final returnValue = ContactsGetTopPeers(
correspondents: correspondents,
botsPm: botsPm,
botsInline: botsInline,
phoneCalls: phoneCalls,
forwardUsers: forwardUsers,
forwardChats: forwardChats,
groups: groups,
channels: channels,
offset: offset,
limit: limit,
hash: hash,
);
// Now return the deserialized [ContactsGetTopPeers].
return returnValue;
}