addChild method

ListTreeNode addChild(
  1. BaseBlock listBlock
)

Add child to the current node. Return the newly created node

Implementation

ListTreeNode addChild(BaseBlock listBlock) {
  var treeNode =
      ListTreeNode(isRoot: false, parent: this, content: listBlock);
  this.children.add(treeNode);
  return treeNode;
}