SimpleLinearGauge constructor

const SimpleLinearGauge({
  1. Key? key,
  2. required double maxValue,
  3. required double actualValue,
  4. double minValue = 0,
  5. int divisions = 10,
  6. Text title = const Text(''),
  7. TitlePosition titlePosition = TitlePosition.top,
  8. Color pointerColor = Colors.blue,
  9. Icon pointerIcon = const Icon(Icons.arrow_right_sharp, color: Colors.black),
  10. int decimalPlaces = 0,
  11. bool isAnimate = true,
  12. int animationDuration = kDefaultAnimationDuration,
  13. GaugeOrientation gaugeOrientation = GaugeOrientation.vertical,
  14. double gaugeStrokeWidth = 5.0,
  15. double rangeStrokeWidth = 5.0,
  16. double majorTickStrokeWidth = 5,
  17. double minorTickStrokeWidth = 5.0,
  18. TextStyle actualValueTextStyle = const TextStyle(color: Colors.black),
  19. 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,
      );