CldImageWidget constructor
CldImageWidget({
- required String publicId,
- Key? key,
- CldImageWidgetConfiguration? configuration,
- Cloudinary? cloudinary,
- String? version,
- String? extension,
- String? urlSuffix,
- String? assetType,
- String? deliveryType,
- Transformation? transformation,
- Map<
String, String> ? httpHeaders, - ImageWidgetBuilder? imageBuilder,
- PlaceholderWidgetBuilder? placeholder,
- LoadingErrorWidgetBuilder? errorBuilder,
- Duration? placeholderFadeInDuration,
- int? memCacheWidth,
- int? memCacheHeight,
- String? cacheKey,
- int? maxWidthDiskCache,
- int? maxHeightDiskCache,
- double? width,
- double? height,
- Color? color,
- BlendMode? colorBlendMode,
- BoxFit? fit,
- ImageRepeat repeat = ImageRepeat.noRepeat,
- FilterQuality filterQuality = FilterQuality.low,
- bool matchTextDirection = false,
Implementation
CldImageWidget(
{required String publicId,
super.key,
this.configuration,
Cloudinary? cloudinary,
String? version,
String? extension,
String? urlSuffix,
String? assetType,
String? deliveryType,
Transformation? transformation,
Map<String, String>? httpHeaders,
ImageWidgetBuilder? imageBuilder,
PlaceholderWidgetBuilder? placeholder,
LoadingErrorWidgetBuilder? errorBuilder,
Duration? placeholderFadeInDuration,
int? memCacheWidth,
int? memCacheHeight,
String? cacheKey,
int? maxWidthDiskCache,
int? maxHeightDiskCache,
double? width,
double? height,
Color? color,
BlendMode? colorBlendMode,
BoxFit? fit,
ImageRepeat repeat = ImageRepeat.noRepeat,
FilterQuality filterQuality = FilterQuality.low,
bool matchTextDirection = false})
: super(
imageUrl: '',
httpHeaders: httpHeaders,
imageBuilder: imageBuilder,
placeholder: placeholder,
errorWidget: errorBuilder,
width: width,
height: height,
color: color,
filterQuality: filterQuality,
colorBlendMode: colorBlendMode,
placeholderFadeInDuration: placeholderFadeInDuration,
memCacheWidth: memCacheWidth,
memCacheHeight: memCacheHeight,
cacheKey: cacheKey,
maxWidthDiskCache: maxWidthDiskCache,
maxHeightDiskCache: maxHeightDiskCache,
fit: fit,
repeat: repeat,
matchTextDirection: matchTextDirection) {
cloudinary ??= CloudinaryContext.cloudinary;
cldImage = cloudinary.image(publicId);
if (version != null) {
cldImage.version(version);
}
if (extension != null) {
cldImage.extension(extension);
}
if (urlSuffix != null) {
cldImage.urlSuffix(urlSuffix);
}
if (assetType != null) {
cldImage.assetType(assetType);
}
if (deliveryType != null) {
cldImage.deliveryType(deliveryType);
}
if (transformation != null) {
cldImage.transformation(transformation);
}
}