of<St> static method

Store<St> of<St>(
  1. BuildContext context,
  2. Object? debug
)

Implementation

static Store<St> of<St>(BuildContext context, Object? debug) {
  final StoreProvider<St>? provider =
      context.dependOnInheritedWidgetOfExactType<StoreProvider<St>>();

  if (provider == null)
    throw StoreConnectorError(
      _typeOf<StoreProvider<St>>(),
      debug,
    );

  return provider._store;
}