createCopy method
Creates a deep copy of this DeepNavigationNode with any of the newValues if provided.
Note that unlike setChild, this will add the newChild
as is.
Implementation
DeepNavigationNode<T> createCopy(
{T? newValue, int? newLevel, DeepNavigationNode<T>? newChild}) =>
DeepNavigationNode<T>(newValue ?? value,
level: newLevel ?? level, child: newChild ?? child?.createCopy());