UnfocusDisposition enum

Describe what should happen after FocusNode.unfocus is called.

See also:

Inheritance

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.

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.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent 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.