InputInvoicePremiumGiftStars.deserialize constructor
InputInvoicePremiumGiftStars.deserialize(
- BinaryReader reader
Deserialize.
Implementation
factory InputInvoicePremiumGiftStars.deserialize(BinaryReader reader) {
// Read [InputInvoicePremiumGiftStars] fields.
final flags = reader.readInt32();
final userId = reader.readObject() as InputUserBase;
final months = reader.readInt32();
final hasMessageField = (flags & 1) != 0;
final message =
hasMessageField ? reader.readObject() as TextWithEntitiesBase : null;
// Construct [InputInvoicePremiumGiftStars] object.
final returnValue = InputInvoicePremiumGiftStars(
userId: userId,
months: months,
message: message,
);
// Now return the deserialized [InputInvoicePremiumGiftStars].
return returnValue;
}