Skip to content

Commit dfa7efc

Browse files
authored
Merge pull request #92 from Gustl22/deprecated-use
refactor(windows): Apply deprecation of win32 package
2 parents 86e72a3 + 90c72cd commit dfa7efc

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

wakelock_plus/lib/src/wakelock_plus_windows_plugin.dart

+2-3
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@ class WakelockPlusWindowsPlugin extends WakelockPlusPlatformInterface {
2020
Future<void> toggle({required bool enable}) async {
2121
final int response;
2222
if (enable) {
23-
response = SetThreadExecutionState(
24-
EXECUTION_STATE.ES_CONTINUOUS | EXECUTION_STATE.ES_DISPLAY_REQUIRED);
23+
response = SetThreadExecutionState(ES_CONTINUOUS | ES_DISPLAY_REQUIRED);
2524
} else {
26-
response = SetThreadExecutionState(EXECUTION_STATE.ES_CONTINUOUS);
25+
response = SetThreadExecutionState(ES_CONTINUOUS);
2726
}
2827

2928
// SetThreadExecutionState returns 0 if the operation failed.

0 commit comments

Comments
 (0)