ChatParticipantsForbidden.deserialize constructor
ChatParticipantsForbidden.deserialize(
- BinaryReader reader
Deserialize.
Implementation
factory ChatParticipantsForbidden.deserialize(BinaryReader reader) {
// Read [ChatParticipantsForbidden] fields.
final flags = reader.readInt32();
final chatId = reader.readInt64();
final hasSelfParticipantField = (flags & 1) != 0;
final selfParticipant = hasSelfParticipantField
? reader.readObject() as ChatParticipantBase
: null;
// Construct [ChatParticipantsForbidden] object.
final returnValue = ChatParticipantsForbidden(
chatId: chatId,
selfParticipant: selfParticipant,
);
// Now return the deserialized [ChatParticipantsForbidden].
return returnValue;
}