syncObjects method

void syncObjects(
  1. String collectionName,
  2. List<String> objectIds
)

Manually trigger sync for multiple objects in a collection.

Convenience method to sync multiple objects at once. Each object is synced independently with full data (not diffs).

Example:

realmSync.syncObjects('chat_messages', ['id-1', 'id-2', 'id-3']);

Parameters:

  • collectionName: MongoDB collection name
  • objectIds: List of object IDs to sync

Implementation

void syncObjects(String collectionName, List<String> objectIds) {
  for (final id in objectIds) {
    syncObject(collectionName, id);
  }
}