SimpleTimer class
A Simple Timer Widget
The timer will take the size of its parent
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- SimpleTimer
Constructors
- SimpleTimer({Key? key, required Duration duration, VoidCallback? onStart, VoidCallback? onEnd, void valueListener(Duration timeElapsed)?, String progressTextFormatter(Duration timeElapsed)?, TimerController? controller, TimerStatus? status, TextStyle? progressTextStyle, Duration delay = const Duration(seconds: 0), TimerStyle timerStyle = TimerStyle.ring, bool displayProgressIndicator = true, bool displayProgressText = true, TimerProgressTextCountDirection progressTextCountDirection = TimerProgressTextCountDirection.count_down, TimerProgressIndicatorDirection progressIndicatorDirection = TimerProgressIndicatorDirection.clockwise, Color backgroundColor = Colors.grey, Color progressIndicatorColor = Colors.green, double startAngle = Math.pi * 1.5, double strokeWidth = 5.0})
- Creates a Simple Timer with animated progress indicator
Properties
- backgroundColor → Color
-
The background color of the inner shape (circle) of the timer
final
- controller → TimerController?
-
Controls the status of the timer.
final
- delay → Duration
-
The length of time to delay the start / animation of the timer.
final
- displayProgressIndicator → bool
-
Sets whether to display the progress text.
final
- displayProgressText → bool
-
Sets whether to display the progress text.
final
- duration → Duration
-
The length of time for this timer.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onEnd → VoidCallback?
-
The callback function executed when the timer has finished counting.
final
- onStart → VoidCallback?
-
The callback function executed when the timer starts counting.
final
- progressIndicatorColor → Color
-
The color of the animating progress indicator.
final
- progressIndicatorDirection → TimerProgressIndicatorDirection
-
The rotating direction of this timer's progress indicator.
final
- progressTextCountDirection → TimerProgressTextCountDirection
-
The counting direction (counting up or counting down) of the text displayed by the timer.
final
- progressTextFormatter → (String Function(Duration timeElapsed)?)
-
A callback function to format the text displayed by this Timer.
final
- progressTextStyle → TextStyle?
-
The TextStyle applied to the progress text.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startAngle → double
-
The start angle of the progress indicator.
final
- status → TimerStatus?
-
The current status of the timer.
final
- strokeWidth → double
-
The width of the brush stroke used to paint this timer's shape.
final
- timerStyle → TimerStyle
-
The display style for this timer.
final
- valueListener → (void Function(Duration timeElapsed)?)
-
The callback function executed for each change in the time elapsed by the timer.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< StatefulWidget> -
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