advance method
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) {
if (!_started && controller.started) {
_started = true;
onStart();
}
final remainingDt = controller.advance(dt);
if (_started) {
final progress = controller.progress;
apply(progress);
_lastProgress = progress;
}
if (!_finished && controller.completed) {
_finished = true;
onFinish();
}
return remainingDt;
}