queryState method
Returns "locked" if the system is locked, "idle" if the user has not
generated any input for a specified number of seconds, or "active"
otherwise.
detectionIntervalInSeconds
The system is considered idle if
detectionIntervalInSeconds seconds have elapsed since the last user
input detected.
Implementation
Future<IdleState> queryState(int detectionIntervalInSeconds) async {
var $res = await promiseToFuture<$js.IdleState>(
$js.chrome.idle.queryState(detectionIntervalInSeconds));
return IdleState.fromJS($res);
}