LinearGauge constructor

const LinearGauge({
  1. Key? key,
  2. double? start = 0,
  3. double? end = 100,
  4. double? steps = 0,
  5. bool? showLinearGaugeContainer = true,
  6. GaugeOrientation? gaugeOrientation = GaugeOrientation.horizontal,
  7. TextStyle? textStyle = const TextStyle(fontSize: 12.0, color: Color.fromARGB(255, 86, 86, 86), fontStyle: FontStyle.normal, fontWeight: FontWeight.normal),
  8. double? primaryRulersWidth = 1.0,
  9. double? primaryRulersHeight = 15.0,
  10. double? secondaryRulersHeight = 1.0,
  11. double? secondaryRulersWidth = 1.0,
  12. double? labelTopMargin = 0.0,
  13. Color? primaryRulerColor = Colors.black54,
  14. Color? secondaryRulerColor = Colors.grey,
  15. LinearGaugeBoxDecoration? linearGaugeBoxDecoration = const LinearGaugeBoxDecoration(),
  16. LabelStyle? labelStyle = const LabelStyle(),
  17. double? secondaryRulerPerInterval = 1.0,
  18. bool showSecondaryRulers = true,
  19. bool showPrimaryRulers = true,
  20. double? value = 0,
})

LinearGauge is a visualization of measurement widget with a linear scale values. Linear Gauge as rich sets of config parameters which can be modified as per requirement

start and end is responsible to paint the values as a label.

LinearGauge(
  steps: 2,
  start: 0,
  end: 100,
),

Implementation

const LinearGauge(
    {Key? key,
    this.start = 0,
    this.end = 100,
    this.steps = 0,
    this.showLinearGaugeContainer = true,
    this.gaugeOrientation = GaugeOrientation.horizontal,
    this.textStyle = const TextStyle(
      fontSize: 12.0,
      color: Color.fromARGB(255, 86, 86, 86),
      fontStyle: FontStyle.normal,
      fontWeight: FontWeight.normal,
    ),
    this.primaryRulersWidth = 1.0,
    this.primaryRulersHeight = 15.0,
    this.secondaryRulersHeight = 1.0,
    this.secondaryRulersWidth = 1.0,
    this.labelTopMargin = 0.0,
    this.primaryRulerColor = Colors.black54,
    this.secondaryRulerColor = Colors.grey,
    this.linearGaugeBoxDecoration = const LinearGaugeBoxDecoration(),
    this.labelStyle = const LabelStyle(),
    this.secondaryRulerPerInterval = 1.0,
    this.showSecondaryRulers = true,
    this.showPrimaryRulers = true,
    this.value = 0})
    : super(key: key);