SimpleWaffleChart constructor

const SimpleWaffleChart({
  1. Key? key,
  2. required List<SimpleWaffleChartData> data,
  3. SimpleBarChartStyle style = SimpleBarChartStyle.elegant,
  4. double? totalValue,
  5. int rows = 10,
  6. int columns = 10,
  7. double height = 260,
  8. EdgeInsets padding = _defaultPadding,
  9. SimpleWaffleFillDirection fillDirection = SimpleWaffleFillDirection.bottomToTop,
  10. List<Color>? palette,
  11. Color? cellColor,
  12. Color? emptyColor,
  13. Color? borderColor,
  14. Color? activeColor,
  15. TextStyle? labelStyle,
  16. TextStyle? valueStyle,
  17. bool showLegend = true,
  18. bool showValues = true,
  19. bool showTooltip = true,
  20. bool showActiveCells = true,
  21. bool showEmptyCells = true,
  22. double cellGap = 3,
  23. double cellRadius = 4,
  24. SimpleWaffleValueFormatter? valueFormatter,
  25. SimpleWaffleValueFormatter? percentFormatter,
  26. SimpleWaffleTapCallback? onCellTap,
  27. SimpleWaffleTooltipBuilder? tooltipBuilder,
  28. WidgetBuilder? emptyBuilder,
  29. String? semanticLabel,
  30. bool excludeFromSemantics = false,
  31. Duration animationDuration = const Duration(milliseconds: 700),
  32. Curve animationCurve = Curves.easeOutCubic,
})

Implementation

const SimpleWaffleChart({
  super.key,
  required this.data,
  this.style = SimpleBarChartStyle.elegant,
  this.totalValue,
  this.rows = 10,
  this.columns = 10,
  this.height = 260,
  this.padding = _defaultPadding,
  this.fillDirection = SimpleWaffleFillDirection.bottomToTop,
  this.palette,
  this.cellColor,
  this.emptyColor,
  this.borderColor,
  this.activeColor,
  this.labelStyle,
  this.valueStyle,
  this.showLegend = true,
  this.showValues = true,
  this.showTooltip = true,
  this.showActiveCells = true,
  this.showEmptyCells = true,
  this.cellGap = 3,
  this.cellRadius = 4,
  this.valueFormatter,
  this.percentFormatter,
  this.onCellTap,
  this.tooltipBuilder,
  this.emptyBuilder,
  this.semanticLabel,
  this.excludeFromSemantics = false,
  this.animationDuration = const Duration(milliseconds: 700),
  this.animationCurve = Curves.easeOutCubic,
}) : assert(height > 0),
     assert(rows > 0),
     assert(columns > 0),
     assert(totalValue == null || totalValue > 0),
     assert(cellGap >= 0),
     assert(cellRadius >= 0);