createNode method

void createNode(
  1. int rootId,
  2. int id,
  3. int pid,
  4. int index,
  5. String className,
  6. VoltronMap props,
)

Implementation

void createNode(int rootId, int id, int pid, int index, String className, VoltronMap props) {
  VirtualNode? node = createVirtualNode(rootId, id, pid, index, className, props);
  if (node == null) {
    return;
  }
  _virtualNodes[id] = node;
  VirtualNode? parent = _virtualNodes[pid];
  if (parent != null) {
    parent.addChildAt(node, index);
  }
  updateProps(node, props, true);
}