WCountdown class

倒计时工具类,用于管理倒计时功能

Constructors

WCountdown({WCountdownCallback? callback, WCountdownCallback? onComplete})
构造函数

Properties

callback → WCountdownCallback?
回调函数,每秒调用一次
final
countdown ↔ int
总秒数
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
isPaused ↔ bool
是否已暂停
getter/setter pair
isRun ↔ bool
是否已开始
getter/setter pair
onComplete → WCountdownCallback?
完成回调,倒计时结束时调用
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
暂停倒计时
remaining({WCountdownRemainingType type = WCountdownRemainingType.s}) → String
剩余时间格式化
resume() → void
恢复倒计时
start({required int second}) → void
开始倒计时
stop() → void
停止倒计时
toString() → String
A string representation of this object.
inherited

Operators

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