BusinessBotRecipients.deserialize constructor
BusinessBotRecipients.deserialize(
- BinaryReader reader
Deserialize.
Implementation
factory BusinessBotRecipients.deserialize(BinaryReader reader) {
// Read [BusinessBotRecipients] fields.
final flags = reader.readInt32();
final existingChats = (flags & 1) != 0;
final newChats = (flags & 2) != 0;
final contacts = (flags & 4) != 0;
final nonContacts = (flags & 8) != 0;
final excludeSelected = (flags & 32) != 0;
final hasUsersField = (flags & 16) != 0;
final users = hasUsersField ? reader.readVectorInt64() : null;
final hasExcludeUsersField = (flags & 64) != 0;
final excludeUsers = hasExcludeUsersField ? reader.readVectorInt64() : null;
// Construct [BusinessBotRecipients] object.
final returnValue = BusinessBotRecipients(
existingChats: existingChats,
newChats: newChats,
contacts: contacts,
nonContacts: nonContacts,
excludeSelected: excludeSelected,
users: users?.items,
excludeUsers: excludeUsers?.items,
);
// Now return the deserialized [BusinessBotRecipients].
return returnValue;
}