UnfocusDisposition enum Null safety
Describe what should happen after FocusNode.unfocus is called.
- FocusNode.unfocus, which takes this as its
- scope → const UnfocusDisposition
Focusing the scope in this way clears the FocusScopeNode.focusedChild history for the enclosing scope when it receives focus. Because of this, calling a traversal method like FocusNode.nextFocus after unfocusing will cause the FocusTraversalPolicy to pick the node it thinks should be first in the scope.
This is the default disposition for FocusNode.unfocus.
- previouslyFocusedChild → const UnfocusDisposition
Focus the previously focused child of the nearest focusable enclosing scope of this node.
If there is no previously focused child, then this is equivalent to using the scope disposition.
Unfocusing with this disposition will cause FocusNode.unfocus to walk up the tree to the nearest focusable enclosing scope, then start to walk down the tree, looking for a focused child at its FocusScopeNode.focusedChild.
If the FocusScopeNode.focusedChild is a scope, then look for its FocusScopeNode.focusedChild, and so on, finding the leaf FocusScopeNode.focusedChild that is not a scope, or, failing that, a leaf scope that has no focused child.