release method

void release({
  1. double? fade,
})

Lets go of everything set at run time — the clip or blend played, the speed, the looping, a pause — and plays what was authored from its start, fading from what played over fade seconds (crossfade when null; 0 cuts). What an animator or a timeline does when it lets go of the model.

Implementation

void release({double? fade}) {
  if (!isDriven) return;
  _fadeFromNow(fade ?? crossfade);
  _clipNow = null;
  _speedNow = null;
  _loopNow = null;
  _playingNow = null;
  blendClips = const [];
  blendWeights = const [];
  blendSpeeds = const [];
  phase = 0;
  previousPhase = 0;
  time = 0;
  previousTime = 0;
  cycles = 0;
}