autofocus property Null safety

bool autofocus
final

True if this widget will be selected as the initial focus when no other node in its scope is currently focused.

Ideally, there is only one widget with autofocus set in each FocusScope. If there is more than one widget with autofocus set, then the first one added to the tree will get focus.

Must not be null. Defaults to false.

Implementation

final bool autofocus;