Timer constructor

Timer({
  1. required double period,
  2. VoidCallback? onTick,
  3. bool repeat = false,
  4. bool autoStart = true,
  5. int? tickCount,
})

Implementation

Timer({
  required this.period,
  this.onTick,
  this.repeat = false,
  bool autoStart = true,
  this.tickCount,
}) : assert(
       tickCount == null || tickCount > 0,
       'tickCount must be null or bigger than 0',
     ),
     _running = autoStart;