toggle method

  1. @override
Future<void> toggle({
  1. required bool enable,
})
override

Toggles the wakelock based on the given enable value.

Implementation

@override
Future<void> toggle({required bool enable}) async {
  await _channel.invokeMethod('toggle', <String, dynamic>{
    'enable': enable,
  });
}