HeartbeatUtils class

Calls onBeat every interval until stop or dispose is called.

Constructors

HeartbeatUtils(Duration interval, void onBeat())
Creates a heartbeat that invokes onBeat every interval once start is called.

Properties

hashCode int
The hash code for this object.
no setterinherited
interval Duration
Interval between heartbeat callbacks.
no setter
onBeat → void Function()
Callback invoked every interval while running.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Releases the timer; call when the heartbeat is no longer needed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
start() → void
Starts the periodic heartbeat; cancels any existing timer.
stop() → void
Stops the heartbeat and cancels the timer.
toString() String
A string representation of this object.
override

Operators

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