autofocus property

  1. @override
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.

Defaults to false.

Implementation

@override
final bool autofocus;