fileUrl method

  1. @override
Uri fileUrl(
  1. String fileRefId
)
override

Builds a URL for a file asset.

Implementation

@override
Uri fileUrl(String fileRefId) {
  final fileName = SanityUrlBuilder.fileName(fileRefId);

  final path = '${config.projectId}/${config.dataset}/$fileName';

  return Uri.parse('https://cdn.sanity.io/files/$path');
}