Countdown class
A timer class that provides sleep functionality with optional periodic updates.
- Implementers
Constructors
Properties
- duration → Duration
-
The total duration for which the sleep timer will run.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isRunning ↔ bool
-
Flag indicating whether the timer is currently running.
getter/setter pair
- periodicTime → Duration
-
The time interval for periodic updates during sleep.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
[Duration? duration]) → void -
Resets the sleep timer with an optional new
duration
. -
setOnCompleteListener(
OnCountdownCompleteListener listener) → void - Sets the callback function to be executed when the sleep is complete.
-
setOnRemainingListener(
OnCountdownRemainingListener listener) → void - Sets the callback function to be executed at each periodic update during sleep.
-
start(
) → void - Starts the sleep timer.
-
stop(
) → void - Stops the sleep timer.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited