focusNode property

FocusNode? focusNode
final

An optional focus node to use for this button.

Providing a FocusNode gives programmatic control over focus:

  • focusNode.requestFocus() — focus the button from code.
  • Listen to focusNode to react to focus changes.

If null, the button manages its own internal focus node.

Implementation

final FocusNode? focusNode;