of<T> static method
Implementation
static T of<T>(BuildContext context) {
final provider = context.dependOnInheritedWidgetOfExactType<NiceProvider<T>>();
if (provider == null) {
throw FlutterError('NiceProvider<$T> not found in widget tree');
}
return provider.value;
}