GrockTimer constructor
GrockTimer({
- Key? key,
- Duration? startTime = const Duration(seconds: 10),
- Duration? endTime = const Duration(seconds: 0),
- Duration? interval = const Duration(seconds: 1),
- GrockTimerController? controller,
- Widget builder(
- Duration time
- dynamic onTimerEnd()?,
- dynamic onTimerStart()?,
- dynamic onTimerTick(
- Duration time,
- GrockTimerState state
- bool isInitialStart = false,
- bool isSecondsWidget = true,
- bool isMinuteWidget = true,
- bool isHourWidget = true,
- bool isDayWidget = false,
- TextStyle? textStyle,
Implementation
GrockTimer(
{super.key,
/// The time to start the timer from.
this.startTime = const Duration(seconds: 10),
/// The time to end the timer at.
this.endTime = const Duration(seconds: 0),
/// The interval at which the timer ticks.
this.interval = const Duration(seconds: 1),
/// The controller for the timer.
this.controller,
/// The builder for the timer.
this.builder,
/// The callback for when the timer ends.
this.onTimerEnd,
/// The callback for when the timer starts.
this.onTimerStart,
/// The callback for when the timer ticks.
this.onTimerTick,
/// The initial state of the timer.
this.isInitialStart = false,
/// The widget to display the seconds.
this.isSecondsWidget = true,
/// The widget to display the minutes.
this.isMinuteWidget = true,
/// The widget to display the hours.
this.isHourWidget = true,
/// The widget to display the days.
this.isDayWidget = false,
/// The text style for the timer.
this.textStyle});