From 90c72cd8238a1c12f03a0781189de544c0d39a4f Mon Sep 17 00:00:00 2001 From: swi-oberhauser Date: Wed, 26 Mar 2025 10:45:01 +0100 Subject: [PATCH] refactor(windows): Apply deprecation of win32 package --- wakelock_plus/lib/src/wakelock_plus_windows_plugin.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wakelock_plus/lib/src/wakelock_plus_windows_plugin.dart b/wakelock_plus/lib/src/wakelock_plus_windows_plugin.dart index b57288b..67a3d6c 100644 --- a/wakelock_plus/lib/src/wakelock_plus_windows_plugin.dart +++ b/wakelock_plus/lib/src/wakelock_plus_windows_plugin.dart @@ -20,10 +20,9 @@ class WakelockPlusWindowsPlugin extends WakelockPlusPlatformInterface { Future toggle({required bool enable}) async { final int response; if (enable) { - response = SetThreadExecutionState( - EXECUTION_STATE.ES_CONTINUOUS | EXECUTION_STATE.ES_DISPLAY_REQUIRED); + response = SetThreadExecutionState(ES_CONTINUOUS | ES_DISPLAY_REQUIRED); } else { - response = SetThreadExecutionState(EXECUTION_STATE.ES_CONTINUOUS); + response = SetThreadExecutionState(ES_CONTINUOUS); } // SetThreadExecutionState returns 0 if the operation failed.