buildNewStructure(){
removeAll(children.query());
sprite = Sprite(Flame.images.fromCache('new_structure.png'));
add(ListButton0(g,structure!));
add(ListButton1(g,structure!));
add(ListButton2(g,structure!));
add(ListButton3(g,structure!));
add(LeftButton(g,structure!));
add(RightButton(g,structure!));}
With this design, old components are not deleted when called frequently. What is the reason for this behavior? How to properly remove old components so that they are definitely removed?
This helped solve the problem, but I'm not sure that this is the right solution, I notice a drop in performance.