Timeline constructor

const Timeline({
  1. Key? key,
  2. required List<Widget> children,
  3. ScrollController? controller,
  4. double? gutterSpacing,
  5. required List<SeniorTimelineIndicator> indicators,
  6. double? indicatorSize,
  7. bool isLeftAligned = true,
  8. double? itemGap,
  9. double? lineGap,
  10. bool minimizeable = false,
  11. EdgeInsets padding = const EdgeInsets.all(SeniorSpacing.small),
  12. ScrollPhysics? physics,
  13. bool primary = false,
  14. bool reverse = false,
  15. bool shrinkWrap = true,
  16. double? strokeWidth,
  17. SeniorTimelineStyle? style,
})

Creates a timeline component according to SDS definitions.

The children and indicators parameters are required. The number of records in children and indicators must be equal.

Implementation

const Timeline({
  Key? key,
  required this.children,
  this.controller,
  this.gutterSpacing,
  required this.indicators,
  this.indicatorSize,
  this.isLeftAligned = true,
  this.itemGap,
  this.lineGap,
  this.minimizeable = false,
  this.padding = const EdgeInsets.all(SeniorSpacing.small),
  this.physics,
  this.primary = false,
  this.reverse = false,
  this.shrinkWrap = true,
  this.strokeWidth,
  this.style,
})  : itemCount = children.length,
      assert(children.length == indicators.length),
      super(key: key);