serialize method

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

Serialize.

Implementation

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

  // Write fields.
  buffer.writeInt32(flags);
  buffer.writeObject(peer);
  buffer.writeInt32(topMessage);
  buffer.writeInt32(readInboxMaxId);
  buffer.writeInt32(readOutboxMaxId);
  buffer.writeInt32(unreadCount);
  buffer.writeInt32(unreadMentionsCount);
  buffer.writeInt32(unreadReactionsCount);
  buffer.writeObject(notifySettings);
  final localPtsCopy = pts;
  if (localPtsCopy != null) {
    buffer.writeInt32(localPtsCopy);
  }
  final localDraftCopy = draft;
  if (localDraftCopy != null) {
    buffer.writeObject(localDraftCopy);
  }
  final localFolderIdCopy = folderId;
  if (localFolderIdCopy != null) {
    buffer.writeInt32(localFolderIdCopy);
  }
  final localTtlPeriodCopy = ttlPeriod;
  if (localTtlPeriodCopy != null) {
    buffer.writeInt32(localTtlPeriodCopy);
  }

  // Finished serialization.
}