A copy with child appended to children.
child
TreeNode withChild(TreeNode child) => copyWith(children: [...children, child]);