SimpleEventStripChart constructor

const SimpleEventStripChart({
  1. Key? key,
  2. required List<SimpleEventStripLane> lanes,
  3. SimpleBarChartStyle style = SimpleBarChartStyle.elegant,
  4. DateTime? minDate,
  5. DateTime? maxDate,
  6. DateTime? markerDate,
  7. double height = 260,
  8. EdgeInsets padding = _defaultPadding,
  9. List<Color>? palette,
  10. Color? eventColor,
  11. Color? laneColor,
  12. Color? gridColor,
  13. Color? axisColor,
  14. Color? markerDateColor,
  15. Color? activeColor,
  16. Color? laneBackgroundColor,
  17. TextStyle? laneLabelStyle,
  18. TextStyle? dateStyle,
  19. TextStyle? eventLabelStyle,
  20. bool sortByDate = true,
  21. bool showGrid = true,
  22. bool showLaneLabels = true,
  23. bool showDates = true,
  24. bool showEventLabels = false,
  25. bool showWeights = true,
  26. bool showMarkerDate = true,
  27. bool showTooltip = true,
  28. bool showActiveEvent = true,
  29. int tickCount = 4,
  30. double minEventRadius = 3.5,
  31. double maxEventRadius = 8,
  32. double eventOpacity = 0.86,
  33. SimpleEventStripDateFormatter? dateFormatter,
  34. SimpleEventStripWeightFormatter? weightFormatter,
  35. SimpleEventStripTapCallback? onEventTap,
  36. SimpleEventStripTooltipBuilder? tooltipBuilder,
  37. WidgetBuilder? emptyBuilder,
  38. String? semanticLabel,
  39. bool excludeFromSemantics = false,
  40. Duration animationDuration = const Duration(milliseconds: 700),
  41. Curve animationCurve = Curves.easeOutCubic,
})

Implementation

const SimpleEventStripChart({
  super.key,
  required this.lanes,
  this.style = SimpleBarChartStyle.elegant,
  this.minDate,
  this.maxDate,
  this.markerDate,
  this.height = 260,
  this.padding = _defaultPadding,
  this.palette,
  this.eventColor,
  this.laneColor,
  this.gridColor,
  this.axisColor,
  this.markerDateColor,
  this.activeColor,
  this.laneBackgroundColor,
  this.laneLabelStyle,
  this.dateStyle,
  this.eventLabelStyle,
  this.sortByDate = true,
  this.showGrid = true,
  this.showLaneLabels = true,
  this.showDates = true,
  this.showEventLabels = false,
  this.showWeights = true,
  this.showMarkerDate = true,
  this.showTooltip = true,
  this.showActiveEvent = true,
  this.tickCount = 4,
  this.minEventRadius = 3.5,
  this.maxEventRadius = 8,
  this.eventOpacity = 0.86,
  this.dateFormatter,
  this.weightFormatter,
  this.onEventTap,
  this.tooltipBuilder,
  this.emptyBuilder,
  this.semanticLabel,
  this.excludeFromSemantics = false,
  this.animationDuration = const Duration(milliseconds: 700),
  this.animationCurve = Curves.easeOutCubic,
}) : assert(height > 0),
     assert(tickCount >= 2),
     assert(minEventRadius >= 0),
     assert(maxEventRadius >= minEventRadius),
     assert(eventOpacity >= 0 && eventOpacity <= 1);