SimpleFunnelChart constructor

const SimpleFunnelChart({
  1. Key? key,
  2. required List<SimpleFunnelChartData> data,
  3. SimpleFunnelMode mode = SimpleFunnelMode.funnel,
  4. SimpleBarChartStyle style = SimpleBarChartStyle.elegant,
  5. double height = 260,
  6. EdgeInsets padding = _defaultPadding,
  7. List<Color>? palette,
  8. Color? stageColor,
  9. Color? trackColor,
  10. Color? borderColor,
  11. Color? activeColor,
  12. TextStyle? labelStyle,
  13. TextStyle? valueStyle,
  14. bool showLabels = true,
  15. bool showValues = true,
  16. bool showPercentages = true,
  17. bool showConversionRates = false,
  18. bool showTrack = false,
  19. bool showTooltip = true,
  20. bool showActiveStage = true,
  21. double neckWidthFactor = 0.22,
  22. double stageGap = 6,
  23. double stageRadius = 6,
  24. bool? useGradient,
  25. SimpleFunnelValueFormatter? valueFormatter,
  26. SimpleFunnelValueFormatter? percentFormatter,
  27. SimpleFunnelTapCallback? onStageTap,
  28. SimpleFunnelTooltipBuilder? tooltipBuilder,
  29. WidgetBuilder? emptyBuilder,
  30. String? semanticLabel,
  31. bool excludeFromSemantics = false,
  32. Duration animationDuration = const Duration(milliseconds: 700),
  33. Curve animationCurve = Curves.easeOutCubic,
})

Implementation

const SimpleFunnelChart({
  super.key,
  required this.data,
  this.mode = SimpleFunnelMode.funnel,
  this.style = SimpleBarChartStyle.elegant,
  this.height = 260,
  this.padding = _defaultPadding,
  this.palette,
  this.stageColor,
  this.trackColor,
  this.borderColor,
  this.activeColor,
  this.labelStyle,
  this.valueStyle,
  this.showLabels = true,
  this.showValues = true,
  this.showPercentages = true,
  this.showConversionRates = false,
  this.showTrack = false,
  this.showTooltip = true,
  this.showActiveStage = true,
  this.neckWidthFactor = 0.22,
  this.stageGap = 6,
  this.stageRadius = 6,
  this.useGradient,
  this.valueFormatter,
  this.percentFormatter,
  this.onStageTap,
  this.tooltipBuilder,
  this.emptyBuilder,
  this.semanticLabel,
  this.excludeFromSemantics = false,
  this.animationDuration = const Duration(milliseconds: 700),
  this.animationCurve = Curves.easeOutCubic,
}) : assert(height > 0),
     assert(neckWidthFactor >= 0 && neckWidthFactor <= 1),
     assert(stageGap >= 0),
     assert(stageRadius >= 0);