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

diegotori/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
Web
macOS
Windows
Linux planned

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

Releases

No releases published

Packages

No packages published

Languages

  • Dart 29.6%
  • C++ 20.1%
  • CMake 14.2%
  • JavaScript 11.1%
  • Objective-C 7.5%
  • Ruby 6.3%
  • Other 11.2%