MiuixSpringEngine class
对应 Kotlin SpringEngine 的临界阻尼逐帧引擎。
可手动调用 start/step,也可通过 runSettleAnimation 使用 Flutter
Ticker 驱动,行为与源端 withFrameNanos 循环一致。
Constructors
Properties
- currentPosition ↔ double
-
当前位置。
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- velocity ↔ double
-
当前速度。
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
runSettleAnimation(
{required TickerProvider vsync, required double startValue, double targetValue = 0, required double initialVelocity, required ValueChanged< double> onFrame, VoidCallback? onSettle}) → Future<void> -
使用 Ticker 驱动到平衡,并在每帧调用
onFrame。 -
start(
{required double startValue, required double targetValue, required double initialVelocity}) → void -
初始化一次从
startValue到targetValue的弹簧运动。 -
step(
double deltaTime) → bool - 推进一帧;返回 true 表示已到达平衡位置。
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited