createVirtualNode method
Implementation
VirtualNode? createVirtualNode(
int rootId,
int id,
int pid,
int index,
String className,
VoltronMap props,
) {
VirtualNode? node = context.renderManager.createVirtualNode(
id,
pid,
index,
className,
props,
);
VirtualNode? parent = _virtualNodes[pid];
// // Only text or text child need to create virtual node.
if (className == NodeProps.kTextClassName) {
node = TextVirtualNode(rootId, id, pid, index, context);
} else if (className == NodeProps.kImageClassName && parent != null) {
node = ImageVirtualNode(rootId, id, pid, index, context);
}
return node;
}