serialize method

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

Serialize.

Implementation

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

  // Write fields.
  buffer.writeInt32(flags);
  buffer.writeString(currency);
  buffer.writeInt64(amount);
  buffer.writeInt32(days);
  final localCryptoCurrencyCopy = cryptoCurrency;
  if (localCryptoCurrencyCopy != null) {
    buffer.writeString(localCryptoCurrencyCopy);
  }
  final localCryptoAmountCopy = cryptoAmount;
  if (localCryptoAmountCopy != null) {
    buffer.writeInt64(localCryptoAmountCopy);
  }
  final localMessageCopy = message;
  if (localMessageCopy != null) {
    buffer.writeObject(localMessageCopy);
  }

  // Finished serialization.
}