RangeRadialGauge constructor

const RangeRadialGauge({
  1. double minValue = 0,
  2. required double maxValue,
  3. required double actualValue,
  4. required List<Range> ranges,
  5. TextSpan unit = const TextSpan(text: ''),
  6. double size = 200,
  7. Text? title,
  8. TitlePosition titlePosition = TitlePosition.top,
  9. Color pointerColor = Colors.black,
  10. int decimalPlaces = 0,
  11. bool isAnimate = true,
  12. int animationDuration = kDefaultAnimationDuration,
  13. double rangeStrokeWidth = 70,
  14. TextStyle actualValueTextStyle = const TextStyle(color: Colors.black),
  15. double maxDegree = kDefaultRangeGaugeMaxDegree,
  16. double startDegree = kDefaultRangeGaugeStartDegree,
  17. bool isLegend = false,
  18. 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);