SanityClient class

Constructors

SanityClient({required String projectId, required String dataset, String? token, bool useCdn = true, BaseClient? client})

Properties

dataset String
The dataset of the Sanity.io project.
final
hashCode int
The hash code for this object.
no setterinherited
projectId String
The project ID of the Sanity.io project.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
token String?
The bearer token of the project to use for authentication. If not set, the client will not send the token in the header.
final
useCdn bool
Use the Sanity CDN to fetch data.
final

Methods

download(String ref) Future<Response>
download file from the Sanity API.
fetch(String query, {Map<String, dynamic>? params}) Future
Fetches the query from the Sanity API.
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