GetTimer constructor

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

Implementation

GetTimer({
  Duration duration = Duration.zero,
  this.period = const Duration(seconds: 1),
  this.extendable = false,
  this.onCancel,
  this.onTick,
})  : countDown = false,
      duration = duration - period,
      tag = "Timer" {
  elapsed = this.duration;
}