diff --git a/lib/src/modules/custom_gauge/custom_gauge_painter.dart b/lib/src/modules/custom_gauge/custom_gauge_painter.dart index 081861b..b67079c 100644 --- a/lib/src/modules/custom_gauge/custom_gauge_painter.dart +++ b/lib/src/modules/custom_gauge/custom_gauge_painter.dart @@ -33,7 +33,9 @@ class CustomGaugePainter extends CustomPainter { ); paint.color = gaugeColor; - final sweepAngle = (pi * currentValue) / targetValue; + final sweepAngle = + (pi * (targetValue < currentValue ? targetValue : currentValue)) / + targetValue; canvas.drawArc( Rect.fromCircle(center: center, radius: 100), pi,