Countdown class
A widget that counts down from the given target.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- Countdown
Constructors
- Countdown({Key? key, required DateTime target, required BoxDecoration decoration, Widget daysLabel = _defaultDaysLabel, Widget hoursLabel = _defaultHoursLabel, Widget minutesLabel = _defaultMinutesLabel, Widget secondsLabel = _defaultSecondsLabel, Widget separator = _defaultSeparator, Color? textColor, Timer? timer, VoidCallback? onDone})
-
A widget that counts down from the given target.
const
- Countdown.circle({Key? key, required DateTime target, Color? backgroundColor, Widget daysLabel = _defaultDaysLabel, Widget hoursLabel = _defaultHoursLabel, Widget minutesLabel = _defaultMinutesLabel, Widget secondsLabel = _defaultSecondsLabel, Widget separator = _defaultSeparator, Color? textColor, Timer? timer, VoidCallback? onDone})
- A widget that counts down from the given target.
- Countdown.rectangle({Key? key, required DateTime target, Color? backgroundColor, Widget daysLabel = _defaultDaysLabel, Widget hoursLabel = _defaultHoursLabel, Widget minutesLabel = _defaultMinutesLabel, Widget secondsLabel = _defaultSecondsLabel, Widget separator = _defaultSeparator, Color? textColor, Timer? timer, VoidCallback? onDone})
- A widget that counts down from the given target.
Properties
- daysLabel → Widget
-
The label given to the days.
final
- decoration → BoxDecoration
-
A decoration given to each unit.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hoursLabel → Widget
-
The label given to the hours.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- minutesLabel → Widget
-
The label given to the minutes.
final
- onDone → VoidCallback?
-
Called when the countdown is done.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secondsLabel → Widget
-
The label given to the seconds.
final
- separator → Widget
-
A widget separating the different units.
final
- target → DateTime
-
The target datetime from which to countdown.
final
- textColor → Color?
-
The color of the units value.
final
- timer → Timer?
-
An optional timer if you do not want to use the build in timer.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< Countdown> -
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