MessagesGetPollVotes.deserialize constructor
MessagesGetPollVotes.deserialize(
- BinaryReader reader
Deserialize.
Implementation
factory MessagesGetPollVotes.deserialize(BinaryReader reader) {
// Read [MessagesGetPollVotes] fields.
final flags = reader.readInt32();
final peer = reader.readObject() as InputPeerBase;
final id = reader.readInt32();
final hasOptionField = (flags & 1) != 0;
final option = hasOptionField ? reader.readBytes() : null;
final hasOffsetField = (flags & 2) != 0;
final offset = hasOffsetField ? reader.readString() : null;
final limit = reader.readInt32();
// Construct [MessagesGetPollVotes] object.
final returnValue = MessagesGetPollVotes(
peer: peer,
id: id,
option: option,
offset: offset,
limit: limit,
);
// Now return the deserialized [MessagesGetPollVotes].
return returnValue;
}