enable method

Future<void> enable ()

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.

Implementation

static Future<void> enable() =>
    _channel.invokeMethod('toggle', {'enable': true});