ChatParticipantCreator.deserialize constructor
ChatParticipantCreator.deserialize(
- BinaryReader reader
Deserialize.
Implementation
factory ChatParticipantCreator.deserialize(BinaryReader reader) {
// Read [ChatParticipantCreator] fields.
final flags = reader.readInt32();
final userId = reader.readInt64();
final hasRankField = (flags & 1) != 0;
final rank = hasRankField ? reader.readString() : null;
// Construct [ChatParticipantCreator] object.
final returnValue = ChatParticipantCreator(userId: userId, rank: rank);
// Now return the deserialized [ChatParticipantCreator].
return returnValue;
}