clickedObjects method

void clickedObjects({
  1. required String eventName,
  2. required Iterable<String> objectIDs,
  3. Iterable<int>? positions,
  4. DateTime? timestamp,
})

Track a hits click event. Optional custom timestamp can be provided.

Implementation

void clickedObjects({
  required String eventName,
  required Iterable<String> objectIDs,
  Iterable<int>? positions,
  DateTime? timestamp,
}) {
  if (!isEnabled) {
    return;
  }
  if (delegate.queryID == null) {
    tracker.clickedObjects(
      indexName: delegate.indexName,
      eventName: eventName,
      objectIDs: objectIDs,
      timestamp: timestamp,
    );
  } else {
    tracker.clickedObjectsAfterSearch(
      indexName: delegate.indexName,
      eventName: eventName,
      queryID: delegate.queryID!,
      objectIDs: objectIDs,
      positions: positions!,
      timestamp: timestamp,
    );
  }
}