focused property

ValueListenable<bool> get focused

true when this app currently has user focus.

  • macOS: tracks NSApplication active / resign via the native plugin.
  • Android: tracks app foreground / background via ProcessLifecycleOwner, so a backgrounded-but-alive process reports false.
  • Windows: tracks WM_ACTIVATEAPP on the app's window, so a minimized window or another app in front reports false.
  • iOS: the native plugin serves keepAwake only, so the emitter stays at its true default.

Implementation

ValueListenable<bool> get focused;