GrockTimer constructor

GrockTimer({
  1. Key? key,
  2. Duration? startTime = const Duration(seconds: 10),
  3. Duration? endTime = const Duration(seconds: 0),
  4. Duration? interval = const Duration(seconds: 1),
  5. GrockTimerController? controller,
  6. Widget builder(
    1. Duration time
    )?,
  7. dynamic onTimerEnd()?,
  8. dynamic onTimerStart()?,
  9. dynamic onTimerTick(
    1. Duration time,
    2. GrockTimerState state
    )?,
  10. bool isInitialStart = false,
  11. bool isSecondsWidget = true,
  12. bool isMinuteWidget = true,
  13. bool isHourWidget = true,
  14. bool isDayWidget = false,
  15. 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});