SimpleTreeDiagramChart constructor

const SimpleTreeDiagramChart({
  1. Key? key,
  2. required List<SimpleTreeDiagramData> data,
  3. SimpleTreeDiagramOrientation orientation = SimpleTreeDiagramOrientation.vertical,
  4. SimpleBarChartStyle style = SimpleBarChartStyle.elegant,
  5. double height = 280,
  6. EdgeInsets padding = _defaultPadding,
  7. List<Color>? palette,
  8. Color? nodeColor,
  9. Color? linkColor,
  10. Color? activeColor,
  11. TextStyle? labelStyle,
  12. TextStyle? valueStyle,
  13. bool showLabels = true,
  14. bool showValues = false,
  15. bool showRoot = true,
  16. bool showTooltip = true,
  17. bool showActiveNode = true,
  18. bool curvedLinks = true,
  19. int maxDepth = 4,
  20. double minNodeRadius = 8,
  21. double maxNodeRadius = 18,
  22. double linkWidth = 1.6,
  23. double siblingGap = 18,
  24. SimpleTreeValueFormatter? valueFormatter,
  25. SimpleTreeNodeTapCallback? onNodeTap,
  26. SimpleTreeTooltipBuilder? tooltipBuilder,
  27. WidgetBuilder? emptyBuilder,
  28. String? semanticLabel,
  29. bool excludeFromSemantics = false,
  30. Duration animationDuration = const Duration(milliseconds: 720),
  31. Curve animationCurve = Curves.easeOutCubic,
})

Implementation

const SimpleTreeDiagramChart({
  super.key,
  required this.data,
  this.orientation = SimpleTreeDiagramOrientation.vertical,
  this.style = SimpleBarChartStyle.elegant,
  this.height = 280,
  this.padding = _defaultPadding,
  this.palette,
  this.nodeColor,
  this.linkColor,
  this.activeColor,
  this.labelStyle,
  this.valueStyle,
  this.showLabels = true,
  this.showValues = false,
  this.showRoot = true,
  this.showTooltip = true,
  this.showActiveNode = true,
  this.curvedLinks = true,
  this.maxDepth = 4,
  this.minNodeRadius = 8,
  this.maxNodeRadius = 18,
  this.linkWidth = 1.6,
  this.siblingGap = 18,
  this.valueFormatter,
  this.onNodeTap,
  this.tooltipBuilder,
  this.emptyBuilder,
  this.semanticLabel,
  this.excludeFromSemantics = false,
  this.animationDuration = const Duration(milliseconds: 720),
  this.animationCurve = Curves.easeOutCubic,
}) : assert(height > 0),
     assert(maxDepth >= 1),
     assert(minNodeRadius > 0),
     assert(maxNodeRadius >= minNodeRadius),
     assert(linkWidth > 0),
     assert(siblingGap >= 0);