serialize method

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

Serialize.

Implementation

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

  // Write fields.
  buffer.writeInt32(flags);
  buffer.writeInt32(id);
  buffer.writeDateTime(date);
  buffer.writeObject(peer);
  buffer.writeString(title);
  buffer.writeInt32(iconColor);
  final localIconEmojiIdCopy = iconEmojiId;
  if (localIconEmojiIdCopy != null) {
    buffer.writeInt64(localIconEmojiIdCopy);
  }
  buffer.writeInt32(topMessage);
  buffer.writeInt32(readInboxMaxId);
  buffer.writeInt32(readOutboxMaxId);
  buffer.writeInt32(unreadCount);
  buffer.writeInt32(unreadMentionsCount);
  buffer.writeInt32(unreadReactionsCount);
  buffer.writeInt32(unreadPollVotesCount);
  buffer.writeObject(fromId);
  buffer.writeObject(notifySettings);
  final localDraftCopy = draft;
  if (localDraftCopy != null) {
    buffer.writeObject(localDraftCopy);
  }

  // Finished serialization.
}