move method
Implementation
void move(RenderNode node, RenderNode toNode, int index) {
var viewModel = node.renderViewModel;
var oldParent = viewModel.parent;
if (oldParent != null && oldParent is GroupViewModel) {
oldParent.removeViewModel(viewModel);
}
var newParent = toNode.renderViewModel;
if (newParent is GroupViewModel) {
newParent.addViewModel(viewModel, index);
}
LogUtils.d(
"ControllerManager",
"move id: ${node.id} fromId:${oldParent?.id} toId:${newParent.id} ",
);
}