CountdownConfig class

Configuration class for countdown timer behavior and appearance

Constructors

CountdownConfig({required Duration duration, Duration interval = const Duration(seconds: 1), bool autoStart = true, bool showControls = false, bool showReset = false, bool showMilliseconds = false, Duration animationDuration = const Duration(milliseconds: 300), bool enableHapticFeedback = true, String customFormatter(Duration)?, VoidCallback? onFinish, VoidCallback? onPause, VoidCallback? onResume, VoidCallback? onReset, void onTick(Duration remaining)?})
const

Properties

animationDuration Duration
Animation duration for transitions
final
autoStart bool
Whether to auto-start the timer
final
customFormatter String Function(Duration)?
Custom formatter for the time display
final
duration Duration
Duration for the countdown
final
enableHapticFeedback bool
Whether to enable haptic feedback
final
hashCode int
The hash code for this object.
no setteroverride
interval Duration
Timer interval (default: 1 second)
final
onFinish VoidCallback?
Callback when countdown finishes
final
onPause VoidCallback?
Callback when countdown is paused
final
onReset VoidCallback?
Callback when countdown is reset
final
onResume VoidCallback?
Callback when countdown is resumed
final
onTick → void Function(Duration remaining)?
Callback for every tick (optional)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showControls bool
Whether to show pause/resume controls
final
showMilliseconds bool
Whether to show milliseconds
final
showReset bool
Whether to show reset control
final

Methods

copyWith({Duration? duration, Duration? interval, bool? autoStart, bool? showControls, bool? showReset, bool? showMilliseconds, Duration? animationDuration, bool? enableHapticFeedback, String customFormatter(Duration)?, VoidCallback? onFinish, VoidCallback? onPause, VoidCallback? onResume, VoidCallback? onReset, void onTick(Duration remaining)?}) CountdownConfig
Creates a copy of this config with the given fields replaced
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override