setFirstFocus method

void setFirstFocus (FocusScopeNode scope)

Make the given scope the active child scope for this scope.

If the given scope is not yet a part of the focus tree, then add it to the tree as a child of this scope. If it is already part of the focus tree, the given scope must be a descendant of this scope.


void setFirstFocus(FocusScopeNode scope) {
  assert(scope != null);
  if (scope._parent == null) {
  assert(scope.ancestors.contains(this), '$FocusScopeNode $scope must be a child of $this to set it as first focus.');
  if (hasFocus) {
  } else {