redepthChild method Null safety

  1. @protected
void redepthChild(
  1. AbstractNode child
)
protected">@protected

Adjust the depth of the given child to be greater than this node's own depth.

Only call this method from overrides of redepthChildren.

Implementation

@protected
void redepthChild(AbstractNode child) {
  assert(child.owner == owner);
  if (child._depth <= _depth) {
    child._depth = _depth + 1;
    child.redepthChildren();
  }
}