I have a LeafRenderObjectWidget and want to update my view according to the new widget parameters. for example, I have drawn a line and wish to update the line using scale and don't want to paint it again on the next build.
the problem is in the paint function of RenderObject I have access to PaintingContext but it is not the previous one. so I can't use context.canvas.save() and restore it again in the paint function.