markPreserveProgress method

void markPreserveProgress(
  1. TKey key
)

Sets SlideAnimation.preserveProgressOnRebatch = true on the slide entry for key. Tolerant of unregistered keys and inactive slides (no-op).

Set-only-true semantics — the engine implicitly clears the flag when the slide entry is destroyed (settles, cancelled, or replaced via composition). The render layer should never need to clear explicitly.

Implementation

void markPreserveProgress(TKey key) {
  final nid = _nids[key];
  if (nid == null || nid >= _slideByNid.length) return;
  final entry = _slideByNid[nid];
  if (entry == null) return;
  entry.preserveProgressOnRebatch = true;
}