ScaleRadialGauge constructor
const
ScaleRadialGauge({
- required double maxValue,
- required double actualValue,
- double minValue = 0,
- double size = 200,
- Text? title,
- TitlePosition titlePosition = TitlePosition.top,
- Color pointerColor = Colors.blue,
- Color needleColor = Colors.blue,
- int decimalPlaces = 0,
- bool isAnimate = true,
- int animationDuration = kDefaultAnimationDuration,
- TextSpan unit = const TextSpan(text: ''),
- 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);