MessagesReadPollVotes.deserialize constructor

MessagesReadPollVotes.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory MessagesReadPollVotes.deserialize(BinaryReader reader) {
  // Read [MessagesReadPollVotes] fields.
  final flags = reader.readInt32();
  final peer = reader.readObject() as InputPeerBase;
  final hasTopMsgIdField = (flags & 1) != 0;
  final topMsgId = hasTopMsgIdField ? reader.readInt32() : null;

  // Construct [MessagesReadPollVotes] object.
  final returnValue = MessagesReadPollVotes(peer: peer, topMsgId: topMsgId);

  // Now return the deserialized [MessagesReadPollVotes].
  return returnValue;
}