TimelineProperties constructor

const TimelineProperties({
  1. double markerGap = 16,
  2. double iconGap = 12,
  3. double lineWidth = 2,
  4. double? iconSize,
  5. Color lineColor = const Color.fromARGB(255, 163, 163, 168),
  6. MarkerIconAlignment iconAlignment = MarkerIconAlignment.center,
  7. TimelinePosition timelinePosition = TimelinePosition.start,
})

A class that holds the properties for a timeline item.

This class encapsulates various properties that define the appearance and behavior of the timeline, including gaps between markers, the gap between the icon and the marker, the width of the line connecting the markers, the size of the icon, the color of the line, the alignment of the icon, and the position of the timeline.

If no icon is provided in the marker, a small circle with double the line width is displayed instead.

Implementation

const TimelineProperties({
  /// The gap between markers in the timeline.
  this.markerGap = 16,

  /// The gap between the icon and the timeline item.
  this.iconGap = 12,

  /// The width of the line connecting the timeline markers.
  this.lineWidth = 2,

  /// The size of the icon, assumed to be square. By default, the icon size is
  /// twice the line width.
  double? iconSize,

  /// The color of the line connecting the timeline items.
  this.lineColor = const Color.fromARGB(255, 163, 163, 168),

  /// The alignment of the icon relative to the timeline item (top, center,
  /// or bottom), by default the icon is aligned at the top.
  this.iconAlignment = MarkerIconAlignment.center,

  /// The position of the timeline (start(left), center, end(right)), by
  /// default the timeline is left aligned. Note that the timeline item
  /// position is ignored when timelinePosition is left or right.
  this.timelinePosition = TimelinePosition.start,
}) : this.iconSize = iconSize ?? 2 * lineWidth;