animateWith method

TickerFuture animateWith (Simulation simulation)

Drives the animation according to the given simulation.

Returns a TickerFuture that completes when the animation is complete.

The most recently returned TickerFuture, if any, is marked as having been canceled, meaning the future never completes and its TickerFuture.orCancel derivative future completes with a TickerCanceled error.

Implementation

TickerFuture animateWith(Simulation simulation) {
  stop();
  return _startSimulation(simulation);
}