CountDownInstance class
倒计时实例
Constructors
- CountDownInstance({required String id, required int maxSeconds, required CountDownFormat format, required void onUpdate(String timeStr), void onComplete()?})
Properties
- format → CountDownFormat
-
显示格式
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
倒计时ID
final
- isRunning → bool
-
是否正在运行
no setter
- maxSeconds → int
-
最大时间(秒)
final
- onComplete → void Function()?
-
完成回调函数
final
- onUpdate → void Function(String timeStr)
-
更新回调函数,参数为格式化后的时间字符串
final
- remainingSeconds → int
-
获取剩余时间(秒)
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void - 销毁实例
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pause(
) → void - 暂停倒计时
-
reset(
{int? newMaxSeconds}) → void - 重置倒计时
-
resume(
) → void - 恢复倒计时
-
start(
) → void - 启动倒计时
-
stop(
) → void - 停止倒计时
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited