primaryFocus top-level property

FocusNode? get primaryFocus

Provides convenient access to the current FocusManager.primaryFocus from the WidgetsBinding instance.

Implementation

FocusNode? get primaryFocus => WidgetsBinding.instance.focusManager.primaryFocus;