toggleKeepScreen method

  1. @override
Future<void> toggleKeepScreen({
  1. required bool isKeep,
})
override

Toggles the keep screen awake mode.

This function prevents the device screen from turning off automatically based on the provided isKeep value.

Parameters:

  • isKeep (required): A bool value indicating whether to keep the screen awake (true) or allow it to turn off (false).

Returns:

  • A Future that completes when the screen state is toggled.

Example Usage:

await toggleKeepScreen(isKeep: true); // Keep screen awake
await toggleKeepScreen(isKeep: false); // Allow screen to turn off

This method should be implemented to provide actual functionality.

Implementation

@override
Future<void> toggleKeepScreen({required bool isKeep}) async {}