of static method

QueryClient of(
  1. BuildContext context
)

Retrieves the current QueryClient from the widget tree.

Implementation

static QueryClient of(BuildContext context) {
  final provider =
      context.dependOnInheritedWidgetOfExactType<QueryProvider>();
  if (provider == null) {
    throw StateError(
        'No QueryProvider found in context. Wrap your app with QueryProvider.');
  }
  return provider.client;
}