ChannelParticipantsMentions.deserialize constructor

ChannelParticipantsMentions.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory ChannelParticipantsMentions.deserialize(BinaryReader reader) {
  // Read [ChannelParticipantsMentions] fields.
  final flags = reader.readInt32();
  final hasQField = (flags & 1) != 0;
  final q = hasQField ? reader.readString() : null;
  final hasTopMsgIdField = (flags & 2) != 0;
  final topMsgId = hasTopMsgIdField ? reader.readInt32() : null;

  // Construct [ChannelParticipantsMentions] object.
  final returnValue = ChannelParticipantsMentions(
    q: q,
    topMsgId: topMsgId,
  );

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