of<T> method

T of<T>()

Implementation

T of<T>() {
  final provider =
      dependOnInheritedWidgetOfExactType<PlusProviderInherited<T>>();
  if (provider == null) {
    throw FlutterError('No PlusProvider<$T> found in context');
  }
  return provider.provider;
}