INNER CODE UNIT · Dart
disable
creativecreatorormaybenot/wakelock · wakelock/lib/wakelock.dart:81
static Future<void> disable() => toggle(enable: false);
/// Toggles the wakelock on or off.
///
/// You can simply use this function to toggle the wakelock using a [bool]
/// value (for the [enable] parameter).
///
/// ```dart
/// // This line keeps the screen on.
/// Wakelock.toggle(enable: true);
///
/// bool enableWakelock = false;
/// // The following line disables the wakelock.
/// Wakelock.toggle(enable: enableWakelock);
/// ```
///
/// You can await the [Future] to wait for the operation to complete.
static Future<void> toggle({