focusNode property

FocusNode? focusNode
final

Defines the keyboard focus for this widget.

The focusNode is a long-lived object that's typically managed by a StatefulWidget parent. See FocusNode for more information.

To give the keyboard focus to this widget, provide a focusNode and then use the current FocusScope to request the focus:

FocusScope.of(context).requestFocus(myFocusNode); This happens automatically when the widget is tapped.

Implementation

final FocusNode? focusNode;