MilestoneTimeline constructor
MilestoneTimeline({
- Key? key,
- required List<
Milestone> milestones, - Color color = MileColors.kcPrimary,
- Color disabledColor = MileColors.kcGrey,
- Color stickColor = MileColors.kcGrey,
- bool activeWithStick = false,
- bool disableAnimation = false,
- bool showLastStick = false,
- double circleRadius = 8,
- double stickThickness = 1,
- Curve animationCurve = Curves.easeIn,
- Duration animationDuration = const Duration(milliseconds: 500),
- int milestoneIntervalDurationInMillis = 100,
- bool greyoutContentWithInactive = true,
- 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");
}