windowFocusCounter property

ValueNotifier<int> windowFocusCounter
final

Increments each time the native window gains input focus — the signal Android needs before the IME can be raised. Listen for changes when you want to re-trigger a pending focus request at cold start (e.g. a TextField(autofocus: true) whose initial TextInput.show was dropped because the window wasn't yet focused).

The value itself is a monotonically-increasing counter — only useful as a change signal, not as an absolute state.

Implementation

final windowFocusCounter = ValueNotifier<int>(0);