Ticker constructor

Ticker(TickerCallback _onTick, { String debugLabel })

Creates a ticker that will call the provided callback once per frame while running.

An optional label can be provided for debugging purposes. That label will appear in the toString output in debug builds.

Implementation

Ticker(this._onTick, { this.debugLabel }) {
  assert(() {
    _debugCreationStack = StackTrace.current;
    return true;
  }());
}