SetThreadExecutionState function Null safety kernel32

int SetThreadExecutionState(
  1. int esFlags
)

Enables an application to inform the system that it is in use, thereby preventing the system from entering sleep or turning off the display while the application is running.

EXECUTION_STATE SetThreadExecutionState(
  EXECUTION_STATE esFlags
  );

Implementation

int SetThreadExecutionState(int esFlags) {
  final _SetThreadExecutionState = _kernel32.lookupFunction<
      Uint32 Function(Uint32 esFlags),
      int Function(int esFlags)>('SetThreadExecutionState');
  return _SetThreadExecutionState(esFlags);
}