AdvancedCountdownTimer.legacy constructor

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

Constructor with individual parameters for backward compatibility

Implementation

AdvancedCountdownTimer.legacy({
  Key? key,
  this.controller,
  required 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 = CountdownConfig(
        duration: duration,
        interval: interval,
        autoStart: autoStart,
        showControls: showControls,
        showReset: showReset,
        onFinish: onFinish,
        onPause: onPause,
        onResume: onResume,
        onReset: onReset,
        onTick: onTick,
      ),
      super(key: key);