TimerLabelController constructor
TimerLabelController({
- required Duration duration,
- VoidCallback? onTimerEnd,
- bool alwaysShowHours = false,
Creates a TimerLabelController with the specified duration.
To start the countdown, call startTimer. Optionally, provide an onTimerEnd
callback and set alwaysShowHours to true to always show the hours in the formatted time.
Implementation
TimerLabelController({
required this.duration,
this.onTimerEnd,
this.alwaysShowHours = false,
}) {
_secondsRemaining = duration.inSeconds;
}