SimpleBulletChart constructor

const SimpleBulletChart({
  1. Key? key,
  2. required List<SimpleBulletChartData> data,
  3. SimpleBarChartStyle style = SimpleBarChartStyle.elegant,
  4. double height = 220,
  5. EdgeInsets padding = _defaultPadding,
  6. Color? valueColor,
  7. Color? targetColor,
  8. Color? rangeColor,
  9. Color? activeColor,
  10. TextStyle? labelStyle,
  11. TextStyle? valueStyle,
  12. bool showLabels = true,
  13. bool showValues = true,
  14. bool showTooltip = true,
  15. bool showActiveBar = true,
  16. double? barHeightFactor,
  17. double? valueHeightFactor,
  18. double? targetWidth,
  19. SimpleBulletValueFormatter? valueFormatter,
  20. SimpleBulletTapCallback? onBulletTap,
  21. SimpleBulletTooltipBuilder? tooltipBuilder,
  22. WidgetBuilder? emptyBuilder,
  23. String? semanticLabel,
  24. bool excludeFromSemantics = false,
  25. Duration animationDuration = const Duration(milliseconds: 650),
  26. Curve animationCurve = Curves.easeOutCubic,
})

Implementation

const SimpleBulletChart({
  super.key,
  required this.data,
  this.style = SimpleBarChartStyle.elegant,
  this.height = 220,
  this.padding = _defaultPadding,
  this.valueColor,
  this.targetColor,
  this.rangeColor,
  this.activeColor,
  this.labelStyle,
  this.valueStyle,
  this.showLabels = true,
  this.showValues = true,
  this.showTooltip = true,
  this.showActiveBar = true,
  this.barHeightFactor,
  this.valueHeightFactor,
  this.targetWidth,
  this.valueFormatter,
  this.onBulletTap,
  this.tooltipBuilder,
  this.emptyBuilder,
  this.semanticLabel,
  this.excludeFromSemantics = false,
  this.animationDuration = const Duration(milliseconds: 650),
  this.animationCurve = Curves.easeOutCubic,
}) : assert(height > 0),
     assert(
       barHeightFactor == null ||
           (barHeightFactor > 0 && barHeightFactor <= 1),
     ),
     assert(
       valueHeightFactor == null ||
           (valueHeightFactor > 0 && valueHeightFactor <= 1),
     ),
     assert(targetWidth == null || targetWidth > 0);