traversalChildren property
An iterator over the children that are allowed to be traversed by the FocusTraversalPolicy.
Returns the list of focusable, traversable children of this node, regardless of those settings on this focus node. Will return an empty iterable if descendantsAreFocusable is false.
See also
- traversalDescendants, which traverses all of the node's descendants, not just the immediate children.
Implementation
Iterable<FocusNode> get traversalChildren {
if (!descendantsAreFocusable) {
return const Iterable<FocusNode>.empty();
}
return children.where(
(FocusNode node) => !node.skipTraversal && node.canRequestFocus,
);
}