AdvancedCountdownTimer.legacy constructor
AdvancedCountdownTimer.legacy({
- Key? key,
- CountdownTimerController? controller,
- required Duration duration,
- VoidCallback? onFinish,
- VoidCallback? onPause,
- VoidCallback? onResume,
- VoidCallback? onReset,
- void onTick(
- Duration remaining
- Duration interval = const Duration(seconds: 1),
- bool autoStart = true,
- bool showControls = false,
- bool showReset = false,
- CountdownDisplayStyle displayStyle = CountdownDisplayStyle.compact,
- CountdownTheme? theme,
- TextStyle? textStyle,
- TextStyle? titleTextStyle,
- Widget customBuilder(
- BuildContext,
- Duration,
- bool,
- bool,
- VoidCallback? ,
- bool showMilliseconds = false,
- String customFormatter()?,
- Duration animationDuration = const Duration(milliseconds: 300),
- bool enableHapticFeedback = true,
- String? titleText,
- String? subtitleText,
- bool showProgress = true,
- double? progressStrokeWidth,
- Color? progressBackgroundColor,
- Color? progressValueColor,
- bool useResponsiveSizing = true,
- CountdownAnimationConfig? animationConfig,
- CountdownCustomBuilderConfig? customBuilderConfig,
- CountdownAdvancedStyle? advancedStyle,
- Decoration? decoration,
- Decoration? foregroundDecoration,
- double? width,
- double? height,
- double? minWidth,
- double? minHeight,
- double? maxWidth,
- double? maxHeight,
- bool showTimeUnits = false,
- Map<
String, String> ? timeUnitLabels, - bool enableSoundNotifications = false,
- String? customSoundPath,
- bool showLowTimeWarning = true,
- int lowTimeWarningThreshold = 10,
- Color? warningColor,
- bool autoHideWhenFinished = false,
- Duration autoHideDelay = const Duration(seconds: 3),
- bool enableVibrationFeedback = false,
- 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);