makePaint method Null safety

  1. @override
Paint makePaint()

Implementing classes are expected to override this to create a paint object. This gets called whenever the mutator is changed in order to not require each mutator to manually reset the paint to some canonical state. Instead, we simply blow out the old one and make a new one.

Implementation

@override
Paint makePaint() => Paint()..style = PaintingStyle.fill;