BarGraph constructor

const BarGraph({
  1. Key? key,
  2. Color? backgroundColor,
  3. Color barColor = Colors.blue,
  4. Color indicatorsColor = Colors.grey,
  5. TextStyle? textStyle,
  6. Alignment textAlign = Alignment.center,
  7. int fractionDigits = 2,
  8. double value = 15,
  9. int divisions = 10,
  10. double min = 0,
  11. double max = 100,
  12. int animationDuration = 200,
  13. BarGraphOrientation orientation = BarGraphOrientation.verticalFromBottom,
  14. int textFlex = 20,
  15. BarGraphIndicatorStyle indicatorStyle = BarGraphIndicatorStyle.both,
  16. BarGraphIndicatorSpacing indicatorSpacing = BarGraphIndicatorSpacing.spaceAround,
})

Creates an BarGraph Material design's

Implementation

const BarGraph(
    {Key? key,
    this.backgroundColor,
    this.barColor = Colors.blue,
    this.indicatorsColor = Colors.grey,
    this.textStyle,
    this.textAlign = Alignment.center,
    this.fractionDigits = 2,
    this.value = 15,
    this.divisions = 10,
    this.min = 0,
    this.max = 100,
    this.animationDuration = 200,
    this.orientation = BarGraphOrientation.verticalFromBottom,
    this.textFlex = 20,
    this.indicatorStyle = BarGraphIndicatorStyle.both,
    this.indicatorSpacing = BarGraphIndicatorSpacing.spaceAround})
    : assert(
          value >= min, 'The value is less than the specified minimum value'),
      assert(value <= max,
          'The value is greater than the specified maximum value'),
      assert(divisions > 0, 'Divisions must be greater than 0'),
      assert(textFlex > 0 && textFlex < 100),
      super(key: key);