BotsSetCustomVerification.deserialize constructor
BotsSetCustomVerification.deserialize(
- BinaryReader reader
Deserialize.
Implementation
factory BotsSetCustomVerification.deserialize(BinaryReader reader) {
// Read [BotsSetCustomVerification] fields.
final flags = reader.readInt32();
final enabled = (flags & 2) != 0;
final hasBotField = (flags & 1) != 0;
final bot = hasBotField ? reader.readObject() as InputUserBase : null;
final peer = reader.readObject() as InputPeerBase;
final hasCustomDescriptionField = (flags & 4) != 0;
final customDescription =
hasCustomDescriptionField ? reader.readString() : null;
// Construct [BotsSetCustomVerification] object.
final returnValue = BotsSetCustomVerification(
enabled: enabled,
bot: bot,
peer: peer,
customDescription: customDescription,
);
// Now return the deserialized [BotsSetCustomVerification].
return returnValue;
}