AdvancedCountdownTimer constructor

AdvancedCountdownTimer({
  1. Key? key,
  2. CountdownTimerController? controller,
  3. CountdownConfig? config,
  4. Duration? duration,
  5. VoidCallback? onFinish,
  6. VoidCallback? onPause,
  7. VoidCallback? onResume,
  8. VoidCallback? onReset,
  9. void onTick(
    1. Duration remaining
    )?,
  10. Duration interval = const Duration(seconds: 1),
  11. bool autoStart = true,
  12. bool showControls = false,
  13. bool showReset = false,
  14. CountdownDisplayStyle displayStyle = CountdownDisplayStyle.compact,
  15. CountdownTheme? theme,
  16. TextStyle? textStyle,
  17. TextStyle? titleTextStyle,
  18. Widget customBuilder(
    1. BuildContext,
    2. Duration,
    3. bool,
    4. bool,
    5. VoidCallback? ,
    )?,
  19. bool showMilliseconds = false,
  20. String customFormatter(
    1. Duration
    )?,
  21. Duration animationDuration = const Duration(milliseconds: 300),
  22. bool enableHapticFeedback = true,
  23. String? titleText,
  24. String? subtitleText,
  25. bool showProgress = true,
  26. double? progressStrokeWidth,
  27. Color? progressBackgroundColor,
  28. Color? progressValueColor,
  29. bool useResponsiveSizing = true,
  30. CountdownAnimationConfig? animationConfig,
  31. CountdownCustomBuilderConfig? customBuilderConfig,
  32. CountdownAdvancedStyle? advancedStyle,
  33. Decoration? decoration,
  34. Decoration? foregroundDecoration,
  35. double? width,
  36. double? height,
  37. double? minWidth,
  38. double? minHeight,
  39. double? maxWidth,
  40. double? maxHeight,
  41. bool showTimeUnits = false,
  42. Map<String, String>? timeUnitLabels,
  43. bool enableSoundNotifications = false,
  44. String? customSoundPath,
  45. bool showLowTimeWarning = true,
  46. int lowTimeWarningThreshold = 10,
  47. Color? warningColor,
  48. bool autoHideWhenFinished = false,
  49. Duration autoHideDelay = const Duration(seconds: 3),
  50. bool enableVibrationFeedback = false,
  51. List<int>? vibrationPattern,
})

Implementation

AdvancedCountdownTimer({
  Key? key,
  this.controller,
  CountdownConfig? config,
  Duration? duration,
  VoidCallback? onFinish,
  VoidCallback? onPause,
  VoidCallback? onResume,
  VoidCallback? onReset,
  void Function(Duration remaining)? onTick,
  Duration interval = const Duration(seconds: 1),
  bool autoStart = true,
  bool showControls = false,
  bool showReset = false,
  this.displayStyle = CountdownDisplayStyle.compact,
  this.theme,
  this.textStyle,
  this.titleTextStyle,
  this.customBuilder,
  this.showMilliseconds = false,
  this.customFormatter,
  this.animationDuration = const Duration(milliseconds: 300),
  this.enableHapticFeedback = true,
  this.titleText,
  this.subtitleText,
  this.showProgress = true,
  this.progressStrokeWidth,
  this.progressBackgroundColor,
  this.progressValueColor,
  this.useResponsiveSizing = true,
  this.animationConfig,
  this.customBuilderConfig,
  this.advancedStyle,
  this.decoration,
  this.foregroundDecoration,
  this.width,
  this.height,
  this.minWidth,
  this.minHeight,
  this.maxWidth,
  this.maxHeight,
  this.showTimeUnits = false,
  this.timeUnitLabels,
  this.enableSoundNotifications = false,
  this.customSoundPath,
  this.showLowTimeWarning = true,
  this.lowTimeWarningThreshold = 10,
  this.warningColor,
  this.autoHideWhenFinished = false,
  this.autoHideDelay = const Duration(seconds: 3),
  this.enableVibrationFeedback = false,
  this.vibrationPattern,
})  : config = config ??
          CountdownConfig(
            duration: duration ?? const Duration(minutes: 1),
            interval: interval,
            autoStart: autoStart,
            showControls: showControls,
            showReset: showReset,
            onFinish: onFinish,
            onPause: onPause,
            onResume: onResume,
            onReset: onReset,
            onTick: onTick,
          ),
      super(key: key);