BarGraph constructor
const
BarGraph({
- Key? key,
- Color? backgroundColor,
- Color barColor = Colors.blue,
- Color indicatorsColor = Colors.grey,
- TextStyle? textStyle,
- Alignment textAlign = Alignment.center,
- int fractionDigits = 2,
- double value = 15,
- int divisions = 10,
- double min = 0,
- double max = 100,
- int animationDuration = 200,
- BarGraphOrientation orientation = BarGraphOrientation.verticalFromBottom,
- int textFlex = 20,
- BarGraphIndicatorStyle indicatorStyle = BarGraphIndicatorStyle.both,
- 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);