SimpleTimelineChart constructor
const
SimpleTimelineChart({
- Key? key,
- required List<
SimpleTimelineEvent> events, - SimpleTimelineOrientation orientation = SimpleTimelineOrientation.vertical,
- SimpleBarChartStyle style = SimpleBarChartStyle.elegant,
- double height = 280,
- EdgeInsets padding = _defaultPadding,
- List<
Color> ? palette, - Color? markerColor,
- Color? connectorColor,
- Color? activeColor,
- Color? eventBackgroundColor,
- TextStyle? dateStyle,
- TextStyle? titleStyle,
- TextStyle? descriptionStyle,
- bool sortByDate = true,
- bool alternating = false,
- bool showDates = true,
- bool showDescriptions = true,
- bool showTags = true,
- bool showConnector = true,
- bool showTooltip = true,
- bool showActiveEvent = true,
- double markerRadius = 7,
- double connectorWidth = 2,
- double eventSpacing = 14,
- SimpleTimelineDateFormatter? dateFormatter,
- SimpleTimelineTapCallback? onEventTap,
- SimpleTimelineTooltipBuilder? tooltipBuilder,
- WidgetBuilder? emptyBuilder,
- String? semanticLabel,
- bool excludeFromSemantics = false,
- Duration animationDuration = const Duration(milliseconds: 680),
- 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);