GetTimer.countDown constructor

GetTimer.countDown(
  1. Duration? duration, {
  2. Duration period = const Duration(seconds: 1),
  3. bool extendable = true,
  4. GetTimerCallback? onCancel,
  5. GetTimerCallback? onTick,
})

Implementation

GetTimer.countDown(
  Duration? duration, {
  this.period = const Duration(seconds: 1),
  this.extendable = true,
  this.onCancel,
  this.onTick,
})  : countDown = true,
      duration = duration?.let((it) => it! - period) ?? Duration.zero,
      tag = "CountDown" {
  elapsed = this.duration;
}