serialize method

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

Serialize.

Implementation

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

  // Write fields.
  buffer.writeInt32(flags);
  buffer.writeString(currency);
  buffer.writeInt64(value);
  buffer.writeDateTime(initialSaleDate);
  buffer.writeInt64(initialSaleStars);
  buffer.writeInt64(initialSalePrice);
  final localLastSaleDateCopy = lastSaleDate;
  if (localLastSaleDateCopy != null) {
    buffer.writeDateTime(localLastSaleDateCopy);
  }
  final localLastSalePriceCopy = lastSalePrice;
  if (localLastSalePriceCopy != null) {
    buffer.writeInt64(localLastSalePriceCopy);
  }
  final localFloorPriceCopy = floorPrice;
  if (localFloorPriceCopy != null) {
    buffer.writeInt64(localFloorPriceCopy);
  }
  final localAveragePriceCopy = averagePrice;
  if (localAveragePriceCopy != null) {
    buffer.writeInt64(localAveragePriceCopy);
  }
  final localListedCountCopy = listedCount;
  if (localListedCountCopy != null) {
    buffer.writeInt32(localListedCountCopy);
  }
  final localFragmentListedCountCopy = fragmentListedCount;
  if (localFragmentListedCountCopy != null) {
    buffer.writeInt32(localFragmentListedCountCopy);
  }
  final localFragmentListedUrlCopy = fragmentListedUrl;
  if (localFragmentListedUrlCopy != null) {
    buffer.writeString(localFragmentListedUrlCopy);
  }

  // Finished serialization.
}