ScaleRadialGauge constructor

const ScaleRadialGauge({
  1. required double maxValue,
  2. required double actualValue,
  3. double minValue = 0,
  4. double size = 200,
  5. Text? title,
  6. TitlePosition titlePosition = TitlePosition.top,
  7. Color pointerColor = Colors.blue,
  8. Color needleColor = Colors.blue,
  9. int decimalPlaces = 0,
  10. bool isAnimate = true,
  11. int animationDuration = kDefaultAnimationDuration,
  12. TextSpan unit = const TextSpan(text: ''),
  13. Key? key,
})

Creates a scale Gauge.

The minValue and maxValue must not be null.

Implementation

const ScaleRadialGauge({
  required this.maxValue,
  required this.actualValue,
  this.minValue = 0,
  this.size = 200,
  this.title,
  this.titlePosition = TitlePosition.top,
  this.pointerColor = Colors.blue,
  this.needleColor = Colors.blue,
  this.decimalPlaces = 0,
  this.isAnimate = true,
  this.animationDuration = kDefaultAnimationDuration,
  this.unit = const TextSpan(text: ''),
  Key? key,
})  : assert(actualValue <= maxValue,
          'actualValue must be less than or equal to maxValue'),
      assert(size >= 140, 'size must be greater than 75'),
      assert(actualValue >= minValue,
          'actualValue must be greater than or equal to minValue'),
      super(key: key);