UnfocusDisposition enum

Describe what should happen after FocusNode.unfocus is called.

See also:


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.

const UnfocusDisposition(1)
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.

const UnfocusDisposition(0)
values → const List<UnfocusDisposition>

A constant List of the values in this enum, in order of their declaration.

const List<UnfocusDisposition>


hashCode int
The hash code for this object. [...]
read-only, inherited
index int

The integer index of this enum.

runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toString() String
Returns a string representation of this object.


operator ==(Object other) bool
The equality operator. [...]