serialize method

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

Serialize.

Implementation

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

  // Write fields.
  buffer.writeInt32(flags);
  buffer.writeDateTime(startDate);
  buffer.writeDateTime(endDate);
  buffer.writeInt64(averagePrice);
  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.
}