MyCircularCountdownTimer constructor

const MyCircularCountdownTimer({
  1. Key? key,
  2. int years = 0,
  3. int months = 0,
  4. int weeks = 0,
  5. int days = 0,
  6. int hours = 0,
  7. int minutes = 0,
  8. int seconds = 0,
  9. VoidCallback? onComplete,
  10. ValueChanged<CountdownTime>? onPlay,
  11. ValueChanged<CountdownTime>? onPause,
  12. ValueChanged<CountdownTime>? onChangedTime,
  13. double size = 200,
  14. double strokeWidth = 10,
  15. Color backgroundColor = Colors.transparent,
  16. Color progressColor = Colors.green,
  17. Gradient? progressGradient,
  18. TextStyle textStyle = const TextStyle(fontSize: 18, fontWeight: FontWeight.bold, color: Colors.black),
  19. bool autoStart = true,
  20. bool showControlButton = true,
  21. Alignment controlButtonAlignment = Alignment.bottomCenter,
  22. double controlButtonContainerWidth = 60,
  23. double controlButtonContainerHeight = 60,
  24. double controlButtonIconSize = 30,
  25. Color controlButtonBackgroundColor = Colors.white,
  26. Color controlButtonIconColor = Colors.black,
  27. double controlButtonBorderRadius = 30,
  28. double bottomOverlayHeight = 40,
})

Implementation

const MyCircularCountdownTimer({
  super.key,
  this.years = 0,
  this.months = 0,
  this.weeks = 0,
  this.days = 0,
  this.hours = 0,
  this.minutes = 0,
  this.seconds = 0,
  this.onComplete,
  this.onPlay,
  this.onPause,
  this.onChangedTime,
  this.size = 200,
  this.strokeWidth = 10,
  this.backgroundColor = Colors.transparent,
  this.progressColor = Colors.green,
  this.progressGradient,
  this.textStyle = const TextStyle(
    fontSize: 18,
    fontWeight: FontWeight.bold,
    color: Colors.black,
  ),
  this.autoStart = true,
  this.showControlButton = true,
  this.controlButtonAlignment = Alignment.bottomCenter,
  this.controlButtonContainerWidth = 60,
  this.controlButtonContainerHeight = 60,
  this.controlButtonIconSize = 30,
  this.controlButtonBackgroundColor = Colors.white,
  this.controlButtonIconColor = Colors.black,
  this.controlButtonBorderRadius = 30,
  this.bottomOverlayHeight = 40,
});