RestartableTimer class

A non-periodic timer that can be restarted any number of times.

Once restarted (via reset), the timer counts down from its original duration again.

Implemented types
  • Timer

Constructors

RestartableTimer(Duration _duration, ZoneCallback _callback)
Creates a new timer. [...]

Properties

hashCode → int
The hash code for this object. [...]
read-only, inherited
isActive → bool
Returns whether the timer is still active. [...]
read-only, override
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited
tick → int
The number of durations preceding the most recent timer event on the most recent countdown. [...]
read-only, override

Methods

cancel() → void
Cancels the timer. [...]
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
reset() → void
Restarts the timer so that it counts down from its original duration again. [...]
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator. [...]
inherited