sanity_client library

A Native Dart client to connect to Sanity.io and run GROQ queries.

It supports all parameters of the query API.

Classes

ImageOptions
Options to customize the image URL.
PerformanceInfo
A class that extracts various performance information from a Sanity response.
SanityClient
The client for fetching data from Sanity
SanityConfig
Configuration for the Sanity client
SanityDataset
A class to represent a Sanity dataset.
SanityQueryResponse
A class that represents a Sanity query response.
SanityUrlBuilder
A URL builder implementation for Sanity.
ServerResponse
A class to represent a Sanity response to a query.
UrlBuilder<TConfig>
Provides the main interface for building URLs for Sanity assets.

Enums

Perspective
The various perspectives that can be used to fetch data from Sanity

Exceptions / Errors

BadRequestException
Exception when the request is invalid.
FetchDataException
Exception thrown when a document is not found.
InvalidReferenceException
Exception when the request is forbidden.
SanityException
Base type for exceptions thrown by the Sanity client.
UnauthorizedException
Exception when the request is unauthorized and does not include a valid token in the Authorization header.