of static method

QueryClient of(
  1. BuildContext context
)

Gets the QueryClient from the BuildContext if available

This can throw an error if the QueryClient is not available

Implementation

static QueryClient of(BuildContext context) {
  return context
      .dependOnInheritedWidgetOfExactType<QueryClientProvider>()!
      .client;
}