serialize method

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

Serialize.

Implementation

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

  // Write fields.
  buffer.writeInt32(flags);
  buffer.writeInt64(collectibleId);
  buffer.writeInt64(giftEmojiId);
  buffer.writeInt64(backgroundEmojiId);
  buffer.writeInt32(accentColor);
  buffer.writeVectorInt32(colors);
  final localDarkAccentColorCopy = darkAccentColor;
  if (localDarkAccentColorCopy != null) {
    buffer.writeInt32(localDarkAccentColorCopy);
  }
  final localDarkColorsCopy = darkColors;
  if (localDarkColorsCopy != null) {
    buffer.writeVectorInt32(localDarkColorsCopy);
  }

  // Finished serialization.
}