GaugeIndicator constructor
const
GaugeIndicator({
- Key? key,
- double value = 0.0,
- double size = 200.0,
- double strokeWidth = 15.0,
- Color valueColor = Colors.blue,
- Color backgroundColor = const Color(0xFFE0E0E0),
- Gradient? gradient,
- double startAngle = 135.0,
- double sweepAngle = 270.0,
- bool showValue = true,
- GaugeLabelPosition labelPosition = GaugeLabelPosition.center,
- String valueFormatter(
- double value
- TextStyle? valueTextStyle,
- Widget? center,
- bool animation = false,
- Duration animationDuration = const Duration(milliseconds: 500),
- Curve animationCurve = Curves.easeInOut,
- GaugeStyle gaugeStyle = GaugeStyle.simple,
- int tickCount = 10,
- double tickLength = 8.0,
- Color? tickColor,
- List<
GaugeSegment> ? segments, - List<
GaugeRange> ? ranges, - bool showNeedle = false,
- Color needleColor = Colors.red,
- double needleLength = 0.8,
- bool showMinMax = false,
- String? minLabel,
- String? maxLabel,
- TextStyle? minMaxTextStyle,
- Widget? title,
- Widget? subtitle,
- StrokeCap strokeCap = StrokeCap.round,
- VoidCallback? onAnimationEnd,
Creates a gauge indicator widget.
Implementation
// ignore: sort_constructors_first
const GaugeIndicator({
super.key,
this.value = 0.0,
this.size = 200.0,
this.strokeWidth = 15.0,
this.valueColor = Colors.blue,
this.backgroundColor = const Color(0xFFE0E0E0),
this.gradient,
this.startAngle = 135.0,
this.sweepAngle = 270.0,
this.showValue = true,
this.labelPosition = GaugeLabelPosition.center,
this.valueFormatter,
this.valueTextStyle,
this.center,
this.animation = false,
this.animationDuration = const Duration(milliseconds: 500),
this.animationCurve = Curves.easeInOut,
this.gaugeStyle = GaugeStyle.simple,
this.tickCount = 10,
this.tickLength = 8.0,
this.tickColor,
this.segments,
this.ranges,
this.showNeedle = false,
this.needleColor = Colors.red,
this.needleLength = 0.8,
this.showMinMax = false,
this.minLabel,
this.maxLabel,
this.minMaxTextStyle,
this.title,
this.subtitle,
this.strokeCap = StrokeCap.round,
this.onAnimationEnd,
}) : assert(
value >= 0.0 && value <= 1.0, 'Value must be between 0.0 and 1.0');