initGazeTracker method
Initializes the SeeSo gaze tracker functionality.
This function initializes the SeeSo gaze tracker with the provided licenseKey and
optional feature flags.
-
The
licenseKeyparameter is mandatory and should be obtained from manage.seeso.io for authentication. Without a valid license key, the initialization will fail. -
The
useAttentionparameter, when set totrue, enables the attention tracking feature, which monitors the user's focus on the screen. -
The
useBlinkparameter, when set totrue, enables the blink tracking feature, which detects when the user blinks their eyes. -
The
useDrowsinessparameter, when set totrue, 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);
}