When scaling and moving with the InteractiveViewer the paint method inside CustomPaint is triggered. How to prevent that?
...
InteractiveViewer(
child: CustomPaint(
painter: TestPainter(),
),
),
...
class TestPainter extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
print('painting...');
}
@override
bool shouldRepaint(CustomPainter oldDelegate) {
return false;
}
}