performPaint method
Hook for subclasses to implement actual painting.
Implementation
@override
void performPaint(Buffer buffer, Offset offset) {
if (size.width <= 0 || size.height <= 0) return;
final viewport = Viewport(
buffer,
Rect(offset.dx, offset.dy, size.width, size.height),
);
final progress = widget as LinearProgressIndicator;
final plan = _buildPaintPlan(progress);
for (var y = 0; y < plan.height; y++) {
for (var x = 0; x < plan.width; x++) {
_paintCell(viewport, plan, x, y);
}
}
}