animateOnce property

bool? animateOnce
finalinherited

animate-once 开关:只在 key(需为稳定的 ValueKey)首次出现时播放入场动画, 同一 Provider 下再次挂载直接显示终值。null(默认)继承最近 CounterProvider.animateOnce。无稳定 key 或没有 Provider 时退化为每次都动画。

只管入场(initialValue → 目标值);挂载之后的 value / controller 变化照常动画。 示例:AnimatedCounter(key: ValueKey(row.id), value: row.total, animateOnce: true)。

Implementation

final bool? animateOnce;