TimerUtil class Null safety

Constructors

TimerUtil({int duration = Duration.millisecondsPerSecond, OnTimerCallback? callback})
TimerUtil.countDown(int duration, int totalTime, OnTimerCallback? callback)

Properties

callback OnTimerCallback?
定时器回调
read / write
duration int
定时器每隔多久运行的时间,单位毫秒,默认1000毫秒(1秒)
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
totalTime int
倒计时总时间 单位毫秒
read / write

Methods

cancelTimer() → void
取消计时器
isActive() bool
定时器是否启动
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
startCountDown() → void
启动倒计时定时器
startTimer() → void
启动定时器
toString() String
A string representation of this object. [...]
inherited
updateTotalTime(int totalTime) → void
重设倒计时总时间

Operators

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