Future<Null> start()

Starts the clock for this Ticker. If the ticker is not muted, then this also starts calling the ticker's callback once per animation frame.

The returned future resolves once the ticker stops ticking.

Calling this sets isActive to true.

This method cannot be called while the ticker is active. To restart the ticker, first stop it.

By convention, this method is used by the object that receives the ticks (as opposed to the TickerProvider which created the ticker).

Source

Future<Null> start() {
  assert(() {
    if (isTicking) {
      throw new FlutterError(
        'A ticker was started twice.\n'
        'A ticker that is already active cannot be started again without first stopping it.\n'
        'The affected ticker was: ${ this.toString(debugIncludeStack: true) }'
      );
    }
    return true;
  });
  assert(_startTime == null);
  _completer = new Completer<Null>();
  if (shouldScheduleTick)
    scheduleTick();
  if (SchedulerBinding.instance.schedulerPhase.index > SchedulerPhase.idle.index &&
      SchedulerBinding.instance.schedulerPhase.index < SchedulerPhase.postFrameCallbacks.index)
    _startTime = SchedulerBinding.instance.currentFrameTimeStamp;
  return _completer.future;
}