advance method

  1. @internal
double advance(
  1. double dt
)

Used for SequenceEffect. This is similar to update(), but cannot be paused, does not obey removeOnFinish, and returns the "leftover time" similar to EffectController.advance.

Implementation

@internal
double advance(double dt) {
  final remainingDt = controller.advance(dt);
  if (!_started && controller.started) {
    _started = true;
    onStart();
  }
  if (_started) {
    final progress = controller.progress;
    apply(progress);
    _lastProgress = progress;
  }
  if (!_finished && controller.completed) {
    _finished = true;
    onFinish();
  }
  return remainingDt;
}