of<T extends BlocBase> static method
Implementation
static T? of<T extends BlocBase>(BuildContext? context) {
InheritedWidget? provider = context
?.getElementForInheritedWidgetOfExactType<_BlocProviderInherited<T>>()
?.widget;
if (provider is _BlocProviderInherited?) return provider?.bloc;
return null;
}