Closed cirediew closed 4 years ago
It would be great if you could add a gradient for the track! Either use the progressBarColors when trackColor is null. Or something like this in _CurvePainter by adding trackColors:
progressBarColors
trackColor
null
_CurvePainter
trackColors
final progressBarRect = Rect.fromLTWH(0.0, 0.0, size.width, size.width); Paint trackPaint; if (appearance.trackColors != null){ final trackGradient = SweepGradient( startAngle: degreeToRadians(appearance.gradientStartAngle), endAngle: degreeToRadians(appearance.gradientStopAngle), tileMode: TileMode.mirror, colors: appearance.trackColors, ); trackPaint = Paint() ..shader = trackGradient.createShader(progressBarRect) ..strokeCap = StrokeCap.round ..style = PaintingStyle.stroke ..strokeWidth = appearance.trackWidth; } else { trackPaint = Paint() ..strokeCap = StrokeCap.round ..style = PaintingStyle.stroke ..strokeWidth = appearance.trackWidth ..color = appearance.trackColor; } drawCircularArc( canvas: canvas, size: size, paint: trackPaint, ignoreAngle: true, spinnerMode: appearance.spinnerMode);
I will try when I find the time. :)
It has been added in v. 1.2
It would be great if you could add a gradient for the track! Either use the
progressBarColors
whentrackColor
isnull
. Or something like this in_CurvePainter
by addingtrackColors
: