MessagesReadMentions.deserialize constructor

MessagesReadMentions.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

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

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

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