of method
Whether tickers in the given subtree should be enabled or disabled.
This is used automatically by TickerProviderStateMixin and SingleTickerProviderStateMixin to decide if their tickers should be enabled or disabled.
In the absence of a TickerMode widget, this function defaults to true.
Typical usage is as follows:
bool tickingEnabled = TickerMode.of(context);
Implementation
static bool of(BuildContext context) {
final TickerMode widget = context.inheritFromWidgetOfExactType(TickerMode);
return widget?.enabled ?? true;
}