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 {
  final message = ToggleMessage();
  message.enable = enable;

  await _api.toggle(message);
}