TimerUtil class
Constructors
-
TimerUtil({int periodic = Duration.millisecondsPerSecond, required int totalTime, ValueChanged<
int> ? callback})
Properties
-
callback
↔ ValueChanged<
int> ? -
倒计时回调
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- isActive → bool
-
倒计时是否启动.
no setter
- periodic ↔ int
-
倒计时间隔 单位毫秒,默认1000毫秒
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timer ↔ Timer?
-
getter/setter pair
- totalTime ↔ int
-
倒计时总时间 单位毫秒
getter/setter pair
Methods
-
cancel(
) → void - 销毁计时器
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
repeat(
int totalTime) → void - 重设倒计时总时间
-
run(
) → void - 启动倒计时
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited