InputStorePaymentAuthCode.deserialize constructor
InputStorePaymentAuthCode.deserialize(
- BinaryReader reader
Deserialize.
Implementation
factory InputStorePaymentAuthCode.deserialize(BinaryReader reader) {
// Read [InputStorePaymentAuthCode] fields.
final flags = reader.readInt32();
final restore = (flags & 1) != 0;
final phoneNumber = reader.readString();
final phoneCodeHash = reader.readString();
final premiumDays = reader.readInt32();
final currency = reader.readString();
final amount = reader.readInt64();
// Construct [InputStorePaymentAuthCode] object.
final returnValue = InputStorePaymentAuthCode(
restore: restore,
phoneNumber: phoneNumber,
phoneCodeHash: phoneCodeHash,
premiumDays: premiumDays,
currency: currency,
amount: amount,
);
// Now return the deserialized [InputStorePaymentAuthCode].
return returnValue;
}