fluttercommunity / wakelock_plus

Flutter plugin that allows you to keep the device screen awake on Android, iOS, macOS, Windows, Linux, and web.
BSD 3-Clause "New" or "Revised" License
49 stars 38 forks source link

The getter 'EXECUTION_STATE' isn't defined for the class 'WakelockPlusWindowsPlugin'. - 'WakelockPlusWindowsPlugin' #57

Closed gabrielsolomon closed 1 month ago

gabrielsolomon commented 1 month ago

I tried to upgrade our project to flutter 3.0 but we now get the following error:

wakelock_plus_windows_plugin.dart:24:11: Error: The getter 'EXECUTION_STATE' isn't defined for the class 'WakelockPlusWindowsPlugin'.
 - 'WakelockPlusWindowsPlugin' is from 'package:wakelock_plus/src/wakelock_plus_windows_plugin.dart' ('/C:/Users/Solomon/AppData/Local/Pub/Cache/hosted/pub.dev/wakelock_plus-1.2.5/lib/src/wakelock_plus_windows_plugin.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'EXECUTION_STATE'.
          EXECUTION_STATE.ES_CONTINUOUS | EXECUTION_STATE.ES_DISPLAY_REQUIRED);
          ^^^^^^^^^^^^^^^

Is there something we could do to avoid the error?

raaja-guidely commented 1 month ago

yes i too got this error @diegotori please look into this, i'm unable to downgrade due to other plugin support.

Edit:

Sorry my issue win32: ^5.0.2 need to remove in pubspec.yaml @gabrielsolomon i used this for wakelock lib issue

zionnite commented 1 month ago

i'm having same issue, please, anyone able to resolved it?

diegotori commented 1 month ago

Please run flutter pub upgrade when updating versions.

This is primarily due to the win32 plug-in. Upgrading it will also upgrade that dependency as well.

zionnite commented 1 month ago

Please run flutter pub upgrade when updating versions.

This is primarily due to the win32 plug-in. Upgrading it will also upgrade that dependency as well.

Thanks have done so, and it worked very well but however I'm noticing some things I need to create my own issue so it will be addressed there

gabrielsolomon commented 1 month ago

Thank you! It worked