PaymentsGetStarsGiftOptions.deserialize constructor

PaymentsGetStarsGiftOptions.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory PaymentsGetStarsGiftOptions.deserialize(BinaryReader reader) {
  // Read [PaymentsGetStarsGiftOptions] fields.
  final flags = reader.readInt32();
  final hasUserIdField = (flags & 1) != 0;
  final userId = hasUserIdField ? reader.readObject() as InputUserBase : null;

  // Construct [PaymentsGetStarsGiftOptions] object.
  final returnValue = PaymentsGetStarsGiftOptions(userId: userId);

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