UpdateDraftMessage.deserialize constructor
UpdateDraftMessage.deserialize(
- BinaryReader reader
Deserialize.
Implementation
factory UpdateDraftMessage.deserialize(BinaryReader reader) {
// Read [UpdateDraftMessage] fields.
final flags = reader.readInt32();
final peer = reader.readObject() as PeerBase;
final hasTopMsgIdField = (flags & 1) != 0;
final topMsgId = hasTopMsgIdField ? reader.readInt32() : null;
final draft = reader.readObject() as DraftMessageBase;
// Construct [UpdateDraftMessage] object.
final returnValue = UpdateDraftMessage(
peer: peer,
topMsgId: topMsgId,
draft: draft,
);
// Now return the deserialized [UpdateDraftMessage].
return returnValue;
}