disable method Null safety

Future<void> disable()

Disables the wakelock.

This can simply be called using Wakelock.disable() 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.

Implementation

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