AdvancedCountdownTimer class
Advanced Countdown Timer Widget A professional, reusable countdown timer with multiple display options
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- AdvancedCountdownTimer
Constructors
-
AdvancedCountdownTimer({Key? key, CountdownTimerController? controller, CountdownConfig? config, 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)?, 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}) -
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)?, 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
Properties
- advancedStyle → CountdownAdvancedStyle?
-
Advanced styling configuration
final
- animationConfig → CountdownAnimationConfig?
-
Custom animation configuration
final
- animationDuration → Duration
-
Animation duration for transitions
final
- autoHideDelay → Duration
-
Auto-hide delay
final
- autoHideWhenFinished → bool
-
Whether to enable auto-hide when finished
final
- config → CountdownConfig
-
Configuration for the countdown timer
final
- controller → CountdownTimerController?
-
Optional external controller for imperative control.
final
- customBuilder → Widget Function(BuildContext, Duration, bool, bool, VoidCallback? )?
-
Custom widget builder for complete customization
final
- customBuilderConfig → CountdownCustomBuilderConfig?
-
Custom builder configuration
final
- customFormatter → String Function(Duration)?
-
Custom formatter for the time display
final
- customSoundPath → String?
-
Custom sound file path
final
- decoration → Decoration?
-
Custom decoration
final
- displayStyle → CountdownDisplayStyle
-
Display style for the timer
final
- enableHapticFeedback → bool
-
Whether to enable haptic feedback
final
- enableSoundNotifications → bool
-
Whether to enable sound notifications
final
- enableVibrationFeedback → bool
-
Whether to enable vibration feedback
final
- foregroundDecoration → Decoration?
-
Custom foreground decoration
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
Custom height
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- lowTimeWarningThreshold → int
-
Low time warning threshold (seconds)
final
- maxHeight → double?
-
Custom max height
final
- maxWidth → double?
-
Custom max width
final
- minHeight → double?
-
Custom min height
final
- minWidth → double?
-
Custom min width
final
- progressBackgroundColor → Color?
-
Progress indicator background color
final
- progressStrokeWidth → double?
-
Progress indicator stroke width (for circular style)
final
- progressValueColor → Color?
-
Progress indicator value color
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showLowTimeWarning → bool
-
Whether to show warning when time is low
final
- showMilliseconds → bool
-
Whether to show milliseconds
final
- showProgress → bool
-
Whether to show progress indicator
final
- showTimeUnits → bool
-
Whether to show time units (hours, minutes, seconds)
final
- subtitleText → String?
-
Custom subtitle text
final
- textStyle → TextStyle?
-
Custom text style for the timer
final
- theme → CountdownTheme?
-
Theme configuration for the timer appearance
final
-
timeUnitLabels
→ Map<
String, String> ? -
Custom time unit labels
final
- titleText → String?
-
Custom title text for detailed mode
final
- titleTextStyle → TextStyle?
-
Custom text style for the title (in detailed mode)
final
- useResponsiveSizing → bool
-
Whether to use responsive sizing (default: true)
final
-
vibrationPattern
→ List<
int> ? -
Custom vibration pattern
final
- warningColor → Color?
-
Custom warning color
final
- width → double?
-
Custom width
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< AdvancedCountdownTimer> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited