SanityUrlBuilder class final

A URL builder implementation for Sanity.

Supports building URLs for files, images, and queries.

Inheritance

Constructors

SanityUrlBuilder(SanityConfig config)
Creates a new Sanity URL builder with the provided configuration.

Properties

config SanityConfig
The configuration object for the client, which is specific to the URL builder implementation.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

fileUrl(String fileRefId) Uri
Builds a URL for a file asset.
override
imageUrl(String imageRefId, {ImageOptions? options}) Uri
Builds a URL for an image asset.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
queryUrl(String query, {Map<String, dynamic>? params}) Uri
Builds a URL for a GROQ query.
override
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

fileName(String fileRefId) String
Generates the file name from the file reference ID.
imageFileName(String imageRefId) String
Generates the image file name from the image reference ID.