focused property
true when this app currently has user focus.
- macOS: tracks
NSApplicationactive / resign via the native plugin. - Android: tracks app foreground / background via
ProcessLifecycleOwner, so a backgrounded-but-alive process reportsfalse. - Windows: tracks
WM_ACTIVATEAPPon the app's window, so a minimized window or another app in front reportsfalse. - iOS: the native plugin serves keepAwake only, so the emitter stays
at its
truedefault.
Implementation
@override
final ValueEmitter<bool> focused = ValueEmitter(true);