serialize method

  1. @override
void serialize(
  1. List<int> buffer
)
override

Serialize.

Implementation

@override
void serialize(List<int> buffer) {
  // Write type-id 0x45d5b021.
  buffer.writeInt32(0x45d5b021);

  // Write fields.
  buffer.writeInt32(flags);
  buffer.writeString(currency);
  buffer.writeInt64(amount);
  buffer.writeInt64(stars);
  final localCryptoCurrencyCopy = cryptoCurrency;
  if (localCryptoCurrencyCopy != null) {
    buffer.writeString(localCryptoCurrencyCopy);
  }
  final localCryptoAmountCopy = cryptoAmount;
  if (localCryptoAmountCopy != null) {
    buffer.writeInt64(localCryptoAmountCopy);
  }
  final localTransactionIdCopy = transactionId;
  if (localTransactionIdCopy != null) {
    buffer.writeString(localTransactionIdCopy);
  }

  // Finished serialization.
}