TimerUtil class

TimerUtil.

Constructors

TimerUtil({int mInterval = Duration.millisecondsPerSecond, int mTotalTime = 0})

Properties

hashCode int
The hash code for this object.
no setterinherited
mInterval int
Timer interval (unit millisecond,def: 1000 millisecond). Timer间隔 单位毫秒,默认1000毫秒(1秒).
getter/setter pair
mTotalTime int
countdown totalTime. 倒计时总时间
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancel() → void
Cancels the timer. 取消计时器.
isActive() bool
timer is Active. Timer是否启动.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setInterval(int interval) → void
set Timer interval. (unit millisecond). 设置Timer间隔.
setOnTimerTickCallback(OnTimerTickCallback callback) → void
set timer callback.
setTotalTime(int totalTime) → void
set countdown totalTime. (unit millisecond). 设置倒计时总时间.
startCountDown() → void
start countdown Timer. 启动倒计时Timer.
startTimer() → void
start Timer. 启动定时Timer.
toString() String
A string representation of this object.
inherited
updateTotalTime(int totalTime) → void
update countdown totalTime. 重设倒计时总时间.

Operators

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