CircularCountDownTimer class

Create a Circular Countdown Timer.

Inheritance

Constructors

CircularCountDownTimer({required double width, required double height, required int duration, required Color fillColor, required Color ringColor, dynamic timeFormatterFunction(dynamic defaultFormatterFunction(Duration duration), Duration duration)?, Color? backgroundColor, Gradient? fillGradient, Gradient? ringGradient, Gradient? backgroundGradient, int initialDuration = 0, bool isReverse = false, bool isReverseAnimation = false, VoidCallback? onComplete, VoidCallback? onStart, ValueChanged<String>? onChange, double strokeWidth = 5.0, StrokeCap strokeCap = StrokeCap.butt, TextStyle? textStyle, Key? key, bool isTimerTextShown = true, bool autoStart = true, String? textFormat, CountDownController? controller})
const

Properties

autoStart bool
Handles the timer start.
final
backgroundColor Color?
Background Color for Countdown Widget.
final
backgroundGradient Gradient?
Background Gradient for Countdown Widget.
final
controller CountDownController?
Controls (i.e Start, Pause, Resume, Restart) the Countdown Timer.
final
duration int
Countdown duration in Seconds.
final
fillColor Color
Filling Color for Countdown Widget.
final
fillGradient Gradient?
Filling Gradient for Countdown Widget.
final
hashCode int
The hash code for this object.
no setterinherited
height double
Height of the Countdown Widget.
final
initialDuration int
Countdown initial elapsed Duration in Seconds.
final
isReverse bool
Handles Countdown Timer (true for Reverse Countdown (max to 0), false for Forward Countdown (0 to max)).
final
isReverseAnimation bool
Handles Animation Direction (true for Reverse Animation, false for Forward Animation).
final
isTimerTextShown bool
Handles visibility of the Countdown Text.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onChange ValueChanged<String>?
This Callback will execute when the Countdown Changes.
final
onComplete VoidCallback?
This Callback will execute when the Countdown Ends.
final
onStart VoidCallback?
This Callback will execute when the Countdown Starts.
final
ringColor Color
Ring Color for Countdown Widget.
final
ringGradient Gradient?
Ring Gradient for Countdown Widget.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
strokeCap StrokeCap
Begin and end contours with a flat edge and no extension.
final
strokeWidth double
Border Thickness of the Countdown Ring.
final
textFormat String?
Format for the Countdown Text.
final
textStyle TextStyle?
Text Style for Countdown Text.
final
timeFormatterFunction → (dynamic Function(dynamic defaultFormatterFunction(Duration duration), Duration duration)?)
final
width double
Width of the Countdown Widget.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() CircularCountDownTimerState
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}) 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