animationStyle property
Animation timing/easing for every family: expand/collapse, enter/exit, reorder slides, make-room preview, drop settle.
Mutable at runtime. When TreeAnimationStyle.expandCollapse's
duration changes, the new value is written onto every in-flight
AnimationController (operation groups and the bulk group), but a
running simulation is not re-timed: the controller reads
duration at the next forward()/reverse(), so in-flight groups
finish at their old rate and the new duration applies from the next
start. Curves apply to newly started groups only. The per-node
standalone ticker re-reads TreeAnimationStyle.effectiveEnterExit
on every tick, so enter/exit animations adjust immediately; a zero
enter/exit duration makes all in-flight standalone animations
complete (finalize) on the next tick.
Implementation
TreeAnimationStyle get animationStyle {
return _animationStyle;
}
Implementation
set animationStyle(TreeAnimationStyle value) {
assert(value.debugValidate());
if (value == _animationStyle) {
return;
}
final oldOpDuration = _animationStyle.expandCollapse.duration;
final oldSlideDuration = _animationStyle.reorderSlide.duration;
_animationStyle = value;
final newOpDuration = value.expandCollapse.duration;
if (newOpDuration != oldOpDuration) {
_activeBulkGroup?.controller.duration = newOpDuration;
for (final entry in _opGroupEntries) {
entry.value.controller.duration = newOpDuration;
}
}
// Disabled-mode split: a zero family CREATES no motion (install-time
// refusal), while DISABLING, this transition, STOPS motion. Zeroing
// the reorderSlide family purges in-flight slides here, explicitly;
// no other family transition purges (a live drop-settle glide already
// survives a live dropSettle zeroing, and standalone/op-group
// families carry their own live-read semantics).
if (oldSlideDuration != Duration.zero &&
value.reorderSlide.duration == Duration.zero) {
_slide.purgeActive();
// Rows painted mid-delta must repaint at their snapped positions.
_notifyAnimationListeners();
}
}