createTicker method

  1. @override
  2. @protected
Ticker createTicker(
  1. TickerCallback onTick

Creates a ticker with the given callback.

The kind of ticker provided depends on the kind of ticker provider.


Ticker createTicker(TickerCallback onTick) {
  _ticker = Ticker(
    debugLabel: kDebugMode ? 'created by ${describeIdentity(this)}' : null,
  // We assume that this is called from initState, build, or some sort of
  // event handler, and that thus TickerMode.of(context) would return true. We
  // can't actually check that here because if we're in initState then we're
  // not allowed to do inheritance checks yet.
  return _ticker!;