SimpleTimelineChart constructor

const SimpleTimelineChart({
  1. Key? key,
  2. required List<SimpleTimelineEvent> events,
  3. SimpleTimelineOrientation orientation = SimpleTimelineOrientation.vertical,
  4. SimpleBarChartStyle style = SimpleBarChartStyle.elegant,
  5. double height = 280,
  6. EdgeInsets padding = _defaultPadding,
  7. List<Color>? palette,
  8. Color? markerColor,
  9. Color? connectorColor,
  10. Color? activeColor,
  11. Color? eventBackgroundColor,
  12. TextStyle? dateStyle,
  13. TextStyle? titleStyle,
  14. TextStyle? descriptionStyle,
  15. bool sortByDate = true,
  16. bool alternating = false,
  17. bool showDates = true,
  18. bool showDescriptions = true,
  19. bool showTags = true,
  20. bool showConnector = true,
  21. bool showTooltip = true,
  22. bool showActiveEvent = true,
  23. double markerRadius = 7,
  24. double connectorWidth = 2,
  25. double eventSpacing = 14,
  26. SimpleTimelineDateFormatter? dateFormatter,
  27. SimpleTimelineTapCallback? onEventTap,
  28. SimpleTimelineTooltipBuilder? tooltipBuilder,
  29. WidgetBuilder? emptyBuilder,
  30. String? semanticLabel,
  31. bool excludeFromSemantics = false,
  32. Duration animationDuration = const Duration(milliseconds: 680),
  33. Curve animationCurve = Curves.easeOutCubic,
})

Implementation

const SimpleTimelineChart({
  super.key,
  required this.events,
  this.orientation = SimpleTimelineOrientation.vertical,
  this.style = SimpleBarChartStyle.elegant,
  this.height = 280,
  this.padding = _defaultPadding,
  this.palette,
  this.markerColor,
  this.connectorColor,
  this.activeColor,
  this.eventBackgroundColor,
  this.dateStyle,
  this.titleStyle,
  this.descriptionStyle,
  this.sortByDate = true,
  this.alternating = false,
  this.showDates = true,
  this.showDescriptions = true,
  this.showTags = true,
  this.showConnector = true,
  this.showTooltip = true,
  this.showActiveEvent = true,
  this.markerRadius = 7,
  this.connectorWidth = 2,
  this.eventSpacing = 14,
  this.dateFormatter,
  this.onEventTap,
  this.tooltipBuilder,
  this.emptyBuilder,
  this.semanticLabel,
  this.excludeFromSemantics = false,
  this.animationDuration = const Duration(milliseconds: 680),
  this.animationCurve = Curves.easeOutCubic,
}) : assert(height > 0),
     assert(markerRadius >= 0),
     assert(connectorWidth > 0),
     assert(eventSpacing >= 0);