initGazeTracker method

FutureOr<InitializedResult?> initGazeTracker({
  1. required String licenseKey,
  2. bool useAttention = false,
  3. bool useBlink = false,
  4. bool useDrowsiness = false,
})

Initializes the SeeSo gaze tracker functionality.

This function initializes the SeeSo gaze tracker with the provided licenseKey and optional feature flags.

  • The licenseKey parameter is mandatory and should be obtained from manage.seeso.io for authentication. Without a valid license key, the initialization will fail.

  • The useAttention parameter, when set to true, enables the attention tracking feature, which monitors the user's focus on the screen.

  • The useBlink parameter, when set to true, enables the blink tracking feature, which detects when the user blinks their eyes.

  • The useDrowsiness parameter, when set to true, enables the drowsiness tracking feature, which detects when the user appears drowsy.

The function returns an InitializedResult object, which contains information about the success or failure of the initialization process. If the initialization is successful, result in the InitializedResult object will be true, and message will be "ERROR_NONE." If the initialization fails, result will be false, and message will provide details about the failure.

If an error occurs during the initialization process, such as a missing or invalid license key, result will be null in the InitializedResult object.

Implementation

FutureOr<InitializedResult?> initGazeTracker({
  required String licenseKey,
  bool useAttention = false,
  bool useBlink = false,
  bool useDrowsiness = false,
}) {
  _channel.setMethodCallHandler(_handleMethodCall);

  return SeeSoPlatform.instance
      .initGazeTracker(licenseKey, useAttention, useBlink, useDrowsiness);
}