RangeRadialGauge constructor
const
RangeRadialGauge({
- double minValue = 0,
- required double maxValue,
- required double actualValue,
- required List<
Range> ranges, - TextSpan unit = const TextSpan(text: ''),
- double size = 200,
- Text? title,
- TitlePosition titlePosition = TitlePosition.top,
- Color pointerColor = Colors.black,
- int decimalPlaces = 0,
- bool isAnimate = true,
- int animationDuration = kDefaultAnimationDuration,
- double rangeStrokeWidth = 70,
- TextStyle actualValueTextStyle = const TextStyle(color: Colors.black),
- double maxDegree = kDefaultRangeGaugeMaxDegree,
- double startDegree = kDefaultRangeGaugeStartDegree,
- bool isLegend = false,
- Key? key,
Creates a Range Pointer Gauge.
The minValue, maxValue and ranges must not be null.
Implementation
const RangeRadialGauge({
this.minValue = 0,
required this.maxValue,
required this.actualValue,
required this.ranges,
this.unit = const TextSpan(text: ''),
this.size = 200,
this.title,
this.titlePosition = TitlePosition.top,
this.pointerColor = Colors.black,
this.decimalPlaces = 0,
this.isAnimate = true,
this.animationDuration = kDefaultAnimationDuration,
this.rangeStrokeWidth = 70,
this.actualValueTextStyle = const TextStyle(
color: Colors.black,
),
this.maxDegree = kDefaultRangeGaugeMaxDegree,
this.startDegree = kDefaultRangeGaugeStartDegree,
this.isLegend = false,
Key? key,
}) : assert(actualValue <= maxValue,
'actualValue must be less than or equal to maxValue'),
assert(startDegree <= 360, 'startDegree must be less than 360'),
assert(actualValue >= minValue,
'actualValue must be greater than or equal to minValue'),
super(key: key);