setChild method
Creates a copy of this DeepNavigationNode with the newChild
.
Implementation
DeepNavigationNode<T> setChild(DeepNavigationNode<T>? newChild) =>
DeepNavigationNode(value,
level: level, child: newChild?.createCopy(newLevel: level + 1));