focusedChild property

FocusNode? focusedChild

Returns the child of this node that should receive focus if this scope node receives focus.

If hasFocus is true, then this points to the child of this node that is currently focused.

Returns null if there is no currently focused child.

Implementation

FocusNode? get focusedChild {
  assert(_focusedChildren.isEmpty || _focusedChildren.last.enclosingScope == this, 'Focused child does not have the same idea of its enclosing scope as the scope does.');
  return _focusedChildren.isNotEmpty ? _focusedChildren.last : null;
}