0

In Flutter you can animate a CustomPainter by updating value of its repaint field. But it gives you an empty Canvas, every time its paint method is called. This makes it difficult to develop a simple "Paint" application for example, because you have to keep track of everything that is painted until now and draw them every time over and over again.

Is there a way to get a single Canvas, on every paint call, so that you can draw over everything that has been painted before? This is like the method that p5js and Processing are using; If you want to clear the frame, you have to call the function yourself. This way you can create some cool trailing effects for example.

Ashkan Sarlak
  • 7,124
  • 6
  • 39
  • 51

0 Answers0