0

Recently I'm using CustomPaint and CustomPainter to draw line chart. I want to implement the function that, once I click a button, the lines in CustomPaint will disappear, just like no lines have been painted.

So what function should I put in the setState() of the button? Thank for your help.

yamato
  • 85
  • 1
  • 13
  • *"Flutter: Is there any way to clean the contents in CustomPaint?"* - there is no such thing like clean custom painter - if you had for example two circles drawn, the only way one circle to "disappear" is not to draw it – pskink May 15 '22 at 06:32
  • So the CustomPaint is not eraserable? It just becomes a picture after painting? – yamato May 15 '22 at 07:00

0 Answers0