SleepingTimer class

Inheritance

Constructors

SleepingTimer(Duration duration, {Duration periodicTime = const Duration(seconds: 1)})

Properties

duration Duration
The total duration for which the sleep timer will run.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
isRunning bool
Flag indicating whether the timer is currently running.
getter/setter pairinherited
periodicTime Duration
The time interval for periodic updates during sleep.
finalinherited
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.
inherited
setOnCompleteListener(OnCountdownCompleteListener listener) → void
Sets the callback function to be executed when the sleep is complete.
inherited
setOnRemainingListener(OnCountdownRemainingListener listener) → void
Sets the callback function to be executed at each periodic update during sleep.
inherited
start() → void
Starts the sleep timer.
inherited
stop() → void
Stops the sleep timer.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited