serialize method

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

Serialize.

Implementation

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

  // Write fields.
  buffer.writeInt32(flags);
  buffer.writeInt32(collectionId);
  buffer.writeString(title);
  final localIconCopy = icon;
  if (localIconCopy != null) {
    buffer.writeObject(localIconCopy);
  }
  buffer.writeInt32(giftsCount);
  buffer.writeInt64(hash);

  // Finished serialization.
}