advance method
Called each frame to advance the animation.
Implementation
@override
bool advance(double elapsedSeconds) {
_repaintScheduled = false;
final didAdvance = stateMachine.advanceAndApply(elapsedSeconds);
return didAdvance && active;
}