<p dir="auto">This is a performance that goes 0..1, 0..1, 0..1, continually, with a particular period (duration) and curve.</p>
<p dir="auto">Useful for things like continuous spinners.</p>
<p dir="auto">See also <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115974271" data-permission-text="Title is private" data-url="https://github.com/flutter/flutter/issues/215" data-hovercard-type="issue" data-hovercard-url="/flutter/flutter/issues/215/hovercard" href="https://github.com/flutter/flutter/issues/215">#215</a>.</p>
<p dir="auto">I'm working on an update to the CircularProgressIndicator to bring it in line with the Material Design spec (you can see the reasonably correct, although still not perfect Polymer implementation here: <a href="https://elements.polymer-project.org/elements/paper-spinner?view=demo:demo/index.html&amp;active=paper-spinner" rel="nofollow">https://elements.polymer-project.org/elements/paper-spinner?view=demo:demo/index.html&amp;active=paper-spinner</a>)</p>
<p dir="auto">This activity indicator will spin indefinitely until it's hidden or stopped.</p>
<p dir="auto">While I haven't verified it, it appears in my current implementation there may be a 'paused frame' each time my performance is restarted.  By 'paused frame', I mean something different from a dropped frame, but rather a frame where the animation just stops progressing for a frame – when the performance is started again.</p>
<p dir="auto">So what I'd like, is the ability to specify a number of iterations (which could be infinite) for a Performance, so that I can expect the animation to be perfectly smooth between the end state of one iteration and the start state of the next.</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Hixie/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Hixie">@Hixie</a> and I discussed this a bit and may be able to provide more context</p>
<p dir="auto">Below is some sample code of what I'm currently doing (I can point you at the full code if that is helpful).  Ideally I'd replace the 'Performance' with some new class... 'ContinuousPerformance'... or maybe I'd just use a Performance with a new argument 'iterations'?  And I'd be able to remove my status listener that restarts the Performance.</p>
<p dir="auto">Please let me know if you need any more detail.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="_performance = new Performance(duration: new Duration(milliseconds: _kTotalDuration));

_strokeHeadProgress = new AnimatedValue&lt;double&gt;(0.0, end: 1.0,
    curve: new Interval(0.0, 0.5, curve: Curves.fastOutSlowIn));

_strokeTailProgress = new AnimatedValue&lt;double&gt;(0.0, end: 1.0,
        curve: new Interval(0.5, 1.0, curve: Curves.fastOutSlowIn));

_circleRotation = new AnimatedValue&lt;double&gt;(0.0, end: 0.85, curve: Curves.linear);

_stepIndex = 0;

_performance.addStatusListener((PerformanceStatus status) {
  if (status == PerformanceStatus.completed) {
    _stepIndex++;
    if (_stepIndex &gt;= 5) _stepIndex = 0;
    _restartAnimation();
  }
});
_performance.play();"><pre class="notranslate"><code class="notranslate">_performance = new Performance(duration: new Duration(milliseconds: _kTotalDuration));

_strokeHeadProgress = new AnimatedValue&lt;double&gt;(0.0, end: 1.0,
    curve: new Interval(0.0, 0.5, curve: Curves.fastOutSlowIn));

_strokeTailProgress = new AnimatedValue&lt;double&gt;(0.0, end: 1.0,
        curve: new Interval(0.5, 1.0, curve: Curves.fastOutSlowIn));

_circleRotation = new AnimatedValue&lt;double&gt;(0.0, end: 0.85, curve: Curves.linear);

_stepIndex = 0;

_performance.addStatusListener((PerformanceStatus status) {
  if (status == PerformanceStatus.completed) {
    _stepIndex++;
    if (_stepIndex &gt;= 5) _stepIndex = 0;
    _restartAnimation();
  }
});
_performance.play();
</code></pre></div>