SimpleMilestoneChart constructor

const SimpleMilestoneChart({
  1. Key? key,
  2. required List<SimpleMilestoneData> milestones,
  3. SimpleMilestoneOrientation orientation = SimpleMilestoneOrientation.horizontal,
  4. SimpleBarChartStyle style = SimpleBarChartStyle.elegant,
  5. DateTime? minDate,
  6. DateTime? maxDate,
  7. double height = 260,
  8. EdgeInsets padding = _defaultPadding,
  9. List<Color>? palette,
  10. Color? markerColor,
  11. Color? doneColor,
  12. Color? activeColor,
  13. Color? blockedColor,
  14. Color? connectorColor,
  15. Color? trackColor,
  16. Color? milestoneBackgroundColor,
  17. TextStyle? dateStyle,
  18. TextStyle? labelStyle,
  19. TextStyle? descriptionStyle,
  20. bool sortByDate = true,
  21. bool alternating = true,
  22. bool showDates = true,
  23. bool showDescriptions = true,
  24. bool showTags = true,
  25. bool showConnector = true,
  26. bool showStatusMarks = true,
  27. bool showTooltip = true,
  28. bool showActiveMilestone = true,
  29. double markerRadius = 8,
  30. double connectorWidth = 3,
  31. double milestoneSpacing = 14,
  32. SimpleMilestoneDateFormatter? dateFormatter,
  33. SimpleMilestoneTapCallback? onMilestoneTap,
  34. SimpleMilestoneTooltipBuilder? tooltipBuilder,
  35. WidgetBuilder? emptyBuilder,
  36. String? semanticLabel,
  37. bool excludeFromSemantics = false,
  38. Duration animationDuration = const Duration(milliseconds: 700),
  39. Curve animationCurve = Curves.easeOutCubic,
})

Implementation

const SimpleMilestoneChart({
  super.key,
  required this.milestones,
  this.orientation = SimpleMilestoneOrientation.horizontal,
  this.style = SimpleBarChartStyle.elegant,
  this.minDate,
  this.maxDate,
  this.height = 260,
  this.padding = _defaultPadding,
  this.palette,
  this.markerColor,
  this.doneColor,
  this.activeColor,
  this.blockedColor,
  this.connectorColor,
  this.trackColor,
  this.milestoneBackgroundColor,
  this.dateStyle,
  this.labelStyle,
  this.descriptionStyle,
  this.sortByDate = true,
  this.alternating = true,
  this.showDates = true,
  this.showDescriptions = true,
  this.showTags = true,
  this.showConnector = true,
  this.showStatusMarks = true,
  this.showTooltip = true,
  this.showActiveMilestone = true,
  this.markerRadius = 8,
  this.connectorWidth = 3,
  this.milestoneSpacing = 14,
  this.dateFormatter,
  this.onMilestoneTap,
  this.tooltipBuilder,
  this.emptyBuilder,
  this.semanticLabel,
  this.excludeFromSemantics = false,
  this.animationDuration = const Duration(milliseconds: 700),
  this.animationCurve = Curves.easeOutCubic,
}) : assert(height > 0),
     assert(markerRadius >= 0),
     assert(connectorWidth > 0),
     assert(milestoneSpacing >= 0);