SimpleLinearGauge constructor
const
SimpleLinearGauge({
- Key? key,
- required double maxValue,
- required double actualValue,
- double minValue = 0,
- int divisions = 10,
- Text title = const Text(''),
- TitlePosition titlePosition = TitlePosition.top,
- Color pointerColor = Colors.blue,
- Icon pointerIcon = const Icon(Icons.arrow_right_sharp, color: Colors.black),
- int decimalPlaces = 0,
- bool isAnimate = true,
- int animationDuration = kDefaultAnimationDuration,
- GaugeOrientation gaugeOrientation = GaugeOrientation.vertical,
- double gaugeStrokeWidth = 5.0,
- double rangeStrokeWidth = 5.0,
- double majorTickStrokeWidth = 5,
- double minorTickStrokeWidth = 5.0,
- TextStyle actualValueTextStyle = const TextStyle(color: Colors.black),
- TextStyle majorTickValueTextStyle = const TextStyle(color: Colors.black),
Implementation
const SimpleLinearGauge({
super.key,
required double maxValue,
required double actualValue,
double minValue = 0,
int divisions = 10,
Text title = const Text(''),
TitlePosition titlePosition = TitlePosition.top,
Color pointerColor = Colors.blue,
Icon pointerIcon = const Icon(
Icons.arrow_right_sharp,
color: Colors.black,
),
int decimalPlaces = 0,
bool isAnimate = true,
int animationDuration = kDefaultAnimationDuration,
GaugeOrientation gaugeOrientation = GaugeOrientation.vertical,
double gaugeStrokeWidth = 5.0,
double rangeStrokeWidth = 5.0,
double majorTickStrokeWidth = 5,
double minorTickStrokeWidth = 5.0,
TextStyle actualValueTextStyle = const TextStyle(color: Colors.black),
TextStyle majorTickValueTextStyle = const TextStyle(color: Colors.black),
}) : assert(rangeStrokeWidth <= gaugeStrokeWidth,
'rangeStrokeWidth must not be greater than gaugeStrokeWidth'),
super(
minValue: minValue,
maxValue: maxValue,
actualValue: actualValue,
divisions: divisions,
title: title,
titlePosition: titlePosition,
pointerColor: pointerColor,
pointerIcon: pointerIcon,
decimalPlaces: decimalPlaces,
isAnimate: isAnimate,
milliseconds: animationDuration,
gaugeStrokeWidth: gaugeStrokeWidth,
rangeStrokeWidth: rangeStrokeWidth,
majorTickStrokeWidth: majorTickStrokeWidth,
minorTickStrokeWidth: minorTickStrokeWidth,
actualValueTextStyle: actualValueTextStyle,
majorTicksValueTextStyle: majorTickValueTextStyle,
gaugeOrientation: gaugeOrientation,
);