TimerHook class abstract

Return type of the timer hook; implements Timer's cancel, isActive, tick, etc.

Cancelled automatically on unmount; call cancel to cancel earlier if needed. Use pause / resume to temporarily stop and restart without losing the hook; use reset to restart from the beginning (for one-shot, resets the delay).

Implemented types

Constructors

TimerHook()

Properties

hashCode int
The hash code for this object.
no setterinherited
isActive bool
Returns whether the timer is still active.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tick int
The number of durations preceding the most recent timer event.
no setterinherited

Methods

cancel() → void
Cancels the timer.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pause() → void
Stops the timer without cancelling; call resume to run again.
reset() → void
Stops and restarts: equivalent to pause then resume. For one-shot, resets the delay; for periodic, restarts from tick 0.
resume() → void
Restarts the timer after pause.
toString() String
A string representation of this object.
inherited

Operators

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