UnfocusDisposition enum Null safety
Describe what should happen after FocusNode.unfocus is called.
See also:
- FocusNode.unfocus, which takes this as its
disposition
parameter.
Constructors
- UnfocusDisposition()
-
const
Values
- scope → const UnfocusDisposition
-
Focus the nearest focusable enclosing scope of this node, but do not descend to locate the leaf FocusScopeNode.focusedChild the way previouslyFocusedChild does.
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.
UnfocusDisposition()
- 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.
UnfocusDisposition()
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
UnfocusDisposition> -
A constant List of the values in this enum, in order of their declaration.
[scope, previouslyFocusedChild]