of method

ReduxStore of(
  1. BuildContext context
)

Implementation

static ReduxStore of(BuildContext context) {
  final Type type = _type<_InheritedStoreProvider>();
  Widget widget = context.dependOnInheritedWidgetOfExactType<_InheritedStoreProvider>();

  if (widget == null) {
    throw Exception('Couldn\'t find a StoreProvider of the correct type ($type).');
  } else {
    return (widget as _InheritedStoreProvider).store;
  }
}