CldImageWidget constructor

CldImageWidget({
  1. required String publicId,
  2. Key? key,
  3. CldImageWidgetConfiguration? configuration,
  4. Cloudinary? cloudinary,
  5. String? version,
  6. String? extension,
  7. String? urlSuffix,
  8. String? assetType,
  9. String? deliveryType,
  10. Transformation? transformation,
  11. Map<String, String>? httpHeaders,
  12. ImageWidgetBuilder? imageBuilder,
  13. PlaceholderWidgetBuilder? placeholder,
  14. LoadingErrorWidgetBuilder? errorBuilder,
  15. Duration? placeholderFadeInDuration,
  16. int? memCacheWidth,
  17. int? memCacheHeight,
  18. String? cacheKey,
  19. int? maxWidthDiskCache,
  20. int? maxHeightDiskCache,
  21. double? width,
  22. double? height,
  23. Color? color,
  24. BlendMode? colorBlendMode,
  25. BoxFit? fit,
  26. ImageRepeat repeat = ImageRepeat.noRepeat,
  27. FilterQuality filterQuality = FilterQuality.low,
  28. 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);
  }
}