MilestoneTimeline constructor

MilestoneTimeline({
  1. Key? key,
  2. required List<Milestone> milestones,
  3. Color color = MileColors.kcPrimary,
  4. Color disabledColor = MileColors.kcGrey,
  5. Color stickColor = MileColors.kcGrey,
  6. bool activeWithStick = false,
  7. bool disableAnimation = false,
  8. bool showLastStick = false,
  9. double circleRadius = 8,
  10. double stickThickness = 1,
  11. Curve animationCurve = Curves.easeIn,
  12. Duration animationDuration = const Duration(milliseconds: 500),
  13. int milestoneIntervalDurationInMillis = 100,
  14. bool greyoutContentWithInactive = true,
  15. Widget? generalMilestoneIcon,
})

Implementation

MilestoneTimeline(
    {super.key,
    required this.milestones,
    this.color = MileColors.kcPrimary,
    this.disabledColor = MileColors.kcGrey,
    this.stickColor = MileColors.kcGrey,
    this.activeWithStick = false,
    this.disableAnimation = false,
    this.showLastStick = false,
    this.circleRadius = 8,
    this.stickThickness = 1,
    this.animationCurve = Curves.easeIn,
    this.animationDuration = const Duration(milliseconds: 500),
    this.milestoneIntervalDurationInMillis = 100,
    this.greyoutContentWithInactive = true,
    this.generalMilestoneIcon}) {
  assert(circleRadius >= 6, "Radius must be greater or equal to 6.");
  assert(circleRadius >= 0.5, "Thikness must be greater or equal to 0.5.");
  assert(milestoneIntervalDurationInMillis >= 0,
      "Milestone interval duration should greater or equal to 0 millis");
  assert(animationDuration.inMilliseconds >= 300,
      "General animation duration must be >= 300 millis");
}