of static method

HubScope of(
  1. BuildContext context
)

Implementation

static HubScope of(BuildContext context) {
  final provider =
      context.dependOnInheritedWidgetOfExactType<HubScopeProvider>();
  assert(
    provider != null,
    'No HubScopeProvider found. Wrap your app with HubScopeProvider.',
  );
  return provider!.scope;
}