CupertinoTimer constructor

CupertinoTimer({
  1. Key? key,
  2. required Duration duration,
  3. void valueListener(
    1. Duration timeElapsed
    )?,
  4. bool startOnInit = false,
  5. TextStyle? timeStyle,
  6. Color ringColor = Colors.green,
  7. double ringStroke = 6.0,
  8. AnimationController? controller,
})

Implementation

CupertinoTimer({
  Key? key,

  // The duration of time the widget should countdown from.
  required this.duration,

  // Function listener for current value.
  this.valueListener,

  // Whether or not the widget should start countdown after appearing.
  this.startOnInit = false,

  // Custom style of time string.
  this.timeStyle,

  // Color for timer circle, default is green.
  this.ringColor = Colors.green,

  // Width of the timer circle.
  this.ringStroke = 6.0,

  // The timer controller
  this.controller
}) : super(key: key);