Skip to content

Flutter plugin that allows you to keep the device screen awake on Android, iOS, macOS, Windows, and web.

License

Notifications You must be signed in to change notification settings

grisoftware/wakelock

 
 

Repository files navigation

Wakelock GitHub stars Pub version Twitter Follow

Wakelock is Flutter plugin that allows you to keep the device screen awake, i.e. prevent the screen from sleeping.

Supported platforms

Platform wakelock support
Android
iOS

Getting started

To learn more about the plugin and getting started, you can view the main package (wakelock) README.

Plugin structure

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

Contributing

If you want to contribute to this plugin, follow the contributing guide.

Origin

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.

About

Flutter plugin that allows you to keep the device screen awake on Android, iOS, macOS, Windows, and web.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dart 30.5%
  • C++ 28.6%
  • Objective-C 12.5%
  • CMake 11.3%
  • Java 7.9%
  • Kotlin 3.7%
  • Other 5.5%