Perspective enum

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

Inheritance
Available extensions

Values

raw → const Perspective

Fetch all documents including drafts

previewDrafts → const Perspective

Fetch drafts as if they were published.

Note: Queries using the previewDrafts perspective are not cached in the CDN, and will return an error if useCdn is not set to false. You should always explicitly set useCdn to false when using previewDrafts.

published → const Perspective

Fetch only the published documents

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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

Constants

values → const List<Perspective>
A constant List of the values in this enum, in order of their declaration.