descendantsAreFocusable property

bool descendantsAreFocusable
final

If false, will make this widget's descendants unfocusable.

Defaults to true. Does not affect focusability of this node (just its descendants): for that, use canRequestFocus.

If any descendants are focused when this is set to false, they will be unfocused. When descendantsAreFocusable is set to true again, they will not be refocused, although they will be able to accept focus again.

Does not affect the value of canRequestFocus on the descendants.

See also:

  • ExcludeFocus, a widget that uses this property to conditionally exclude focus for a subtree.
  • FocusTraversalGroup, a widget used to group together and configure the focus traversal policy for a widget subtree that has a descendantsAreFocusable parameter to conditionally block focus for a subtree.

Implementation

final bool descendantsAreFocusable