enable static method Null safety

Future<void> enable()

Enables the wakelock.

This can simply be called using Wakelock.enable() and does not return anything. You can await the Future to wait for the operation to complete.

See also:

  • toggle, which allows to enable or disable using a bool parameter.


static Future<void> enable() => toggle(enable: true);