RequestPeerTypeUser.deserialize constructor

RequestPeerTypeUser.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory RequestPeerTypeUser.deserialize(BinaryReader reader) {
  // Read [RequestPeerTypeUser] fields.
  final flags = reader.readInt32();
  final bot = (flags & 1) != 0 ? reader.readBool() : null;
  final premium = (flags & 2) != 0 ? reader.readBool() : null;

  // Construct [RequestPeerTypeUser] object.
  final returnValue = RequestPeerTypeUser(bot: bot, premium: premium);

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