LuckyTimeline class final

把原始时间戳转为可暂停、单帧推进有上限的有效毫秒时间。

例如 timeline.advance(const Duration(milliseconds: 16));首帧只设基准。

Constructors

LuckyTimeline({Duration maxFrameDelta = kLuckyDefaultMaxFrameDelta})
创建时间轴;maxFrameDelta 控制每次 advance 的最大推进量。

Properties

hashCode → int
The hash code for this object.
no setterinherited
isPaused → bool
用户或生命周期任一暂停时为 true。
no setter
lastDeltaMs → double
最近一次推进的毫秒数。
no setter
maxFrameDelta ↔ Duration
每帧最大推进量。
getter/setter pair
nowMs → double
已累计的有效毫秒数。
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

advance(Duration raw) → void
推进到 raw,负增量视为零,暂停期间不推进有效时间。
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pauseLifecycle() → void
标记生命周期暂停。
pauseUser() → void
标记用户暂停。
rebase() → void
让下一次 advance 只建立时间基准,保留累计有效时间。
resumeLifecycle() → void
恢复生命周期暂停,并让恢复后的首帧只建立基准。
resumeUser() → void
恢复用户暂停,并让恢复后的首帧只建立基准。
toString() → String
A string representation of this object.
inherited

Operators

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