Wakelock is Flutter plugin that allows you to keep the device screen awake, i.e. prevent the screen from sleeping.
Platform | wakelock support |
---|---|
Android | ✅ |
iOS | ✅ |
Web | ✅ |
macOS | ✅ |
Windows | ✅ |
Linux | planned |
To learn more about the plugin and getting started, you can view the main package (wakelock
) README.
The wakelock
plugin uses the federated plugins approach.
For this plugin, it means that the basic API is defined using pigeon
. The pigeon files can be found in the pigeons
directory
in the main package. The API is defined in Dart in the wakelock_platform_interface
package.
Furthermore, the Android and iOS implementations can be found in the main package, while the web implementation is in the wakelock_web
package.
The packages in this repo are the following:
Package | Implementations |
---|---|
wakelock |
Main plugin package + Android & iOS implementations |
wakelock_macos |
macOS implementation |
wakelock_platform_interface |
Basic API definition & message handling |
wakelock_web |
Web implementation |
wakelock_windows |
Windows implementation |
If you want to contribute to this plugin, follow the contributing guide.
Originally, this plugin was based on screen
.
Specifically, the wakelock functionality was extracted into this plugin due to lack of maintenance
by the author of the screen
plugin.
Today, the wakelock
plugin has been completely refreshed (using latest Flutter standards and
platform integration) with added support for web, Windows, & macOS.