UpdateBotStarsSubscription.deserialize constructor

UpdateBotStarsSubscription.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory UpdateBotStarsSubscription.deserialize(BinaryReader reader) {
  // Read [UpdateBotStarsSubscription] fields.
  final flags = reader.readInt32();
  final canceled = (flags & 1) != 0;
  final paymentFailed = (flags & 2) != 0;
  final restored = (flags & 4) != 0;
  final userId = reader.readInt64();
  final payload = reader.readBytes();
  final qts = reader.readInt32();

  // Construct [UpdateBotStarsSubscription] object.
  final returnValue = UpdateBotStarsSubscription(
    canceled: canceled,
    paymentFailed: paymentFailed,
    restored: restored,
    userId: userId,
    payload: payload,
    qts: qts,
  );

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