of static method
Thin wrapper of Provider.of
Implementation
static TickerProvider of(BuildContext context) {
try {
return Provider.of<TickerProvider>(context, listen: false);
// ignore: avoid_catches_without_on_clauses
} catch (error) {
throw FlutterError(
'''
TickerProvider.of() called with a context that does not contain
a Disposable of type TickerProvider.
The context used was: $context
Error: $error
''',
);
}
}