createTicker method
- TickerCallback onTick
inherited
Creates a ticker with the given callback.
The kind of ticker provided depends on the kind of ticker provider.
Implementation
@override
Ticker createTicker(TickerCallback onTick) {
if (_tickerModeNotifier == null) {
// Setup TickerMode notifier before we vend the first ticker.
_updateTickerModeNotifier();
}
assert(_tickerModeNotifier != null);
_tickers ??= <_WidgetTicker>{};
final TickerModeData values = _tickerModeNotifier!.value;
final result =
_WidgetTicker(
onTick,
this,
debugLabel: kDebugMode ? 'created by ${describeIdentity(this)}' : null,
)
..muted = !values.enabled
..forceFrames = values.forceFrames;
_tickers!.add(result);
return result;
}