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