Introduction to CustomPainter
In this lesson, we implement two classes:
When implementing a
CustomPainter, we need to override the
paint() method has two arguments:
canvasobject that we can use to draw things
sizeobject that tells us how big is the drawing area
shouldRepaint() should return
true when something has changed.
We can use an
AspectRatio to enforce a certain proportion of width to height (in this case: 1.0).
Here's a full tutorial on how to use