SanityConfig class final

Configuration for the Sanity client

Constructors

SanityConfig({required String projectId, required String dataset, String? token, String? apiVersion, bool? useCdn, Perspective? perspective, bool? explainQuery})
Creates a new Sanity configuration for fetching documents from a project and dataset

Properties

apiVersion → String
The API version to use. It follows the format vYYYY-MM-DD
final
dataset → String
The dataset to fetch data from
final
explainQuery → bool
Whether to explain the query or not
final
hashCode → int
The hash code for this object.
no setterinherited
perspective → Perspective
The perspective to use
final
projectId → String
The project id
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
token → String?
The token to use for authentication
final
useCdn → bool
Whether to use the CDN or not
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

createEventFlux ↔ EventFlux Function()
getter/setter pair
defaultApiVersion → String
The default API version to use
final