PollingScore constructor

PollingScore({
  1. required String visitorId,
  2. String? anonymousId,
  3. EmotionAiDelegate? delegate,
})

Create the polling score object, schedule stop timer, and start polling.

Implementation

PollingScore({
  required this.visitorId,
  this.anonymousId,
  this.delegate,
}) {
  // polling after 10 seconds if no score was fetched.
  _stopTimer = Timer(const Duration(seconds: 10), stopPollingScore);

  // Start polling
  startPolling();
}