createTicker method

  1. @override
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) {
  if (_tickerModeNotifier == null) {
    // Setup TickerMode notifier before we vend the first ticker.
  assert(_tickerModeNotifier != null);
  _tickers ??= <_WidgetTicker>{};
  final _WidgetTicker result = _WidgetTicker(onTick, this, debugLabel: kDebugMode ? 'created by ${describeIdentity(this)}' : null)
    ..muted = !_tickerModeNotifier!.value;
  return result;