Skip to content

Commit

Permalink
add: add step animation duration
Browse files Browse the repository at this point in the history
  • Loading branch information
TalebRafiepour committed Jan 24, 2025
1 parent 91eabe8 commit 9aeb707
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/src/step_progress.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,17 @@ class StepProgress extends StatefulWidget {
required this.controller,
super.key,
this.style = const StepProgressStyle(),
this.stepAnimationDuration = const Duration(milliseconds: 300),
this.width = double.infinity,
this.height = kToolbarHeight,
this.margin = EdgeInsets.zero,
this.padding = EdgeInsets.zero,
this.onStepChanged,
});

/// The duration of the step animation.
final Duration stepAnimationDuration;

/// The controller that manages the state and behavior of the step progress.
final StepProgressController controller;

Expand Down Expand Up @@ -100,7 +104,7 @@ class _StepProgressState extends State<StepProgress>
void initState() {
_animationController = AnimationController(
vsync: this,
duration: const Duration(milliseconds: 300),
duration: widget.stepAnimationDuration,
);
_progressTween = Tween<double>(begin: 0, end: _getEndProgress());
_progressAnimation = _progressTween.animate(
Expand Down

0 comments on commit 9aeb707

Please sign in to comment.