TimelineTile constructor

const TimelineTile({
  1. Key? key,
  2. TimelineAxis axis = TimelineAxis.vertical,
  3. TimelineAlign alignment = TimelineAlign.start,
  4. Widget? startChild,
  5. Widget? endChild,
  6. double? lineXY,
  7. bool hasIndicator = true,
  8. bool isFirst = false,
  9. bool isLast = false,
  10. IndicatorStyle indicatorStyle = const IndicatorStyle(width: 25),
  11. LineStyle beforeLineStyle = const LineStyle(),
  12. LineStyle? afterLineStyle,
})

Implementation

const TimelineTile({
  Key? key,
  this.axis = TimelineAxis.vertical,
  this.alignment = TimelineAlign.start,
  this.startChild,
  this.endChild,
  this.lineXY,
  this.hasIndicator = true,
  this.isFirst = false,
  this.isLast = false,
  this.indicatorStyle = const IndicatorStyle(width: 25),
  this.beforeLineStyle = const LineStyle(),
  LineStyle? afterLineStyle,
})  : afterLineStyle = afterLineStyle ?? beforeLineStyle,
      assert(alignment != TimelineAlign.start || startChild == null,
          'Cannot provide startChild with automatic alignment to the left'),
      assert(alignment != TimelineAlign.end || endChild == null,
          'Cannot provide endChild with automatic alignment to the right'),
      assert(
          alignment != TimelineAlign.manual ||
              (lineXY != null && lineXY >= 0.0 && lineXY <= 1.0),
          'The lineX must be provided when aligning manually, '
          'and must be a value between 0.0 and 1.0 inclusive'),
      super(key: key);