dvImageVariantProvider function
ImageProvider<Object> ?
dvImageVariantProvider(
- DVImage image,
- double devicePixels,
- DVImageVariants variants
The provider for image drawn devicePixels wide, or null when there is
no variant for it and the image itself is fetched.
The one place the address becomes a provider. The link prefetch goes through DVImageVariants.variantUrl to the same address, so what it put in the image cache is found under this key.
Implementation
ImageProvider<Object>? dvImageVariantProvider(
DVImage image,
double devicePixels,
DVImageVariants variants,
) {
final String? served = dvImageServedPath(image);
if (served == null) return null;
final String? url = variants.variantUrl(served, devicePixels);
return url == null ? null : NetworkImage(url);
}