skipTraversal property Null safety

bool skipTraversal

If true, tells the focus traversal policy to skip over this node for purposes of the traversal algorithm.

This may be used to place nodes in the focus tree that may be focused, but not traversed, allowing them to receive key events as part of the focus chain, but not be traversed to via focus traversal.

This is different from canRequestFocus because it only implies that the node can't be reached via traversal, not that it can't be focused. It may still be focused explicitly.

Implementation

bool get skipTraversal {
  if (_skipTraversal) {
    return true;
  }
  for (final FocusNode ancestor in ancestors) {
    if (!ancestor.descendantsAreTraversable) {
      return true;
    }
  }
  return false;
}
void skipTraversal=(bool value)

Implementation

set skipTraversal(bool value) {
  if (value != _skipTraversal) {
    _skipTraversal = value;
    _manager?._markPropertiesChanged(this);
  }
}