PremiumApplyBoost.deserialize constructor

PremiumApplyBoost.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory PremiumApplyBoost.deserialize(BinaryReader reader) {
  // Read [PremiumApplyBoost] fields.
  final flags = reader.readInt32();
  final hasSlotsField = (flags & 1) != 0;
  final slots = hasSlotsField ? reader.readVectorInt32() : null;
  final peer = reader.readObject() as InputPeerBase;

  // Construct [PremiumApplyBoost] object.
  final returnValue = PremiumApplyBoost(
    slots: slots,
    peer: peer,
  );

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