primaryFocus top-level property Null safety

FocusNode? primaryFocus

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

Implementation

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