Countdown class
A little utility class that allows to create countdowns.
Constructors
- Countdown({PositionedRenderSettings renderSettings = const PositionedRenderSettings(top: 10, right: 10, isInvisible: false), required Duration duration, int secondsToSubtract = 1})
- Creates a new countdown instance.
Properties
- duration → Duration
-
The countdown duration.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isPaused → bool
-
Returns whether this countdown is paused.
no setter
- isStarted → bool
-
Returns whether this countdown is started.
no setter
-
listeners
→ List<
CountdownListener> -
Returns a copy of the instance listeners.
no setter
-
props
→ List<
Object?> -
The properties list.
no setter
- renderSettings → PositionedRenderSettings
-
The render settings.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secondsToSubtract → int
-
Number of seconds to subtract.
final
Methods
-
addListener(
CountdownListener listener) → void - Adds a countdown listener to this instance.
-
cancel(
{bool fromConstructor = false}) → void - Chancels this countdown.
-
clearListeners(
) → void - Clears all countdown listeners from this instance.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pause(
) → void - Pauses this countdown.
-
removeListener(
CountdownListener listener) → void - Removes a countdown listener from this instance.
-
resume(
) → void - Resumes this countdown.
-
start(
) → void - Starts the countdown.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited