Wakelock class Null safety
Class providing all wakelock functionality using static members.
To enable the wakelock, you can use Wakelock.enable and to disable it, you can call Wakelock.disable. You do not need to worry about making redundant calls, e.g. calling Wakelock.enable when the wakelock is already enabled as the plugin handles this for you, i.e. it checks the status to determine if the wakelock is already enabled or disabled. If you want the flexibility to pass a bool to control whether the wakelock should be enabled or disabled, you can use Wakelock.toggle.
The Wakelock.enabled getter allows you to retrieve the current wakelock status of the device..