PaymentsGetStarsTransactions.deserialize constructor

PaymentsGetStarsTransactions.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory PaymentsGetStarsTransactions.deserialize(BinaryReader reader) {
  // Read [PaymentsGetStarsTransactions] fields.
  final flags = reader.readInt32();
  final inbound = (flags & 1) != 0;
  final outbound = (flags & 2) != 0;
  final ascending = (flags & 4) != 0;
  final ton = (flags & 16) != 0;
  final hasSubscriptionIdField = (flags & 8) != 0;
  final subscriptionId = hasSubscriptionIdField ? reader.readString() : null;
  final peer = reader.readObject() as InputPeerBase;
  final offset = reader.readString();
  final limit = reader.readInt32();

  // Construct [PaymentsGetStarsTransactions] object.
  final returnValue = PaymentsGetStarsTransactions(
    inbound: inbound,
    outbound: outbound,
    ascending: ascending,
    ton: ton,
    subscriptionId: subscriptionId,
    peer: peer,
    offset: offset,
    limit: limit,
  );

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