keepAwake abstract method

Future<void> keepAwake(
  1. bool enabled
)

Holds the screen awake while enabled, for a call or another session the user watches without touching the device. Idempotent.

iOS disables the idle timer, Android sets FLAG_KEEP_SCREEN_ON on the activity window, macOS takes an IOPMAssertion against display sleep, Windows sets ES_DISPLAY_REQUIRED with SetThreadExecutionState. No hold outlives the app that took it: Android drops it when the activity or the engine detaches, iOS while the app is out of the foreground, macOS on termination, Windows when the window is destroyed, and every platform when the process dies.

Implementation

Future<void> keepAwake(bool enabled);