INNER CODE UNIT · Dart
enable
creativecreatorormaybenot/wakelock · wakelock/lib/wakelock.dart:71
static Future<void> enable() => toggle(enable: true);
/// 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.
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