LinearPainter constructor
LinearPainter({})
Implementation
LinearPainter({
required this.lineThickness,
required this.progress,
required this.progressColor,
required this.backgroundColor,
}) {
_paintBackground.color = backgroundColor;
_paintBackground.style = PaintingStyle.stroke;
_paintBackground.strokeWidth = lineThickness;
_paintLine.color = progress.toString() == '0.0'
? progressColor.withOpacity(0.0)
: progressColor;
_paintLine.style = PaintingStyle.stroke;
_paintLine.strokeWidth = lineThickness;
_paintLine.strokeCap = StrokeCap.butt;
}