ProgressiveCachedNetworkImage constructor

ProgressiveCachedNetworkImage(
  1. String url, {
  2. Key? key,
  3. Alignment alignment = Alignment.center,
  4. Widget progressivePlaceholder(
    1. BuildContext conetxt,
    2. String url
    )?,
  5. double progressiveBlur = 2,
  6. Widget progressiveErrorPlaceholder(
    1. BuildContext context,
    2. String url,
    3. dynamic error
    )?,
  7. int? progressiveResizeHeight,
  8. int? progressiveResizeWidth,
  9. ImageCDNFit progressiveResizerFit = ImageCDNFit.contain,
  10. ImageCDNFormat progressiveResizerFormat = ImageCDNFormat.webp,
  11. ImageCDNFit resizerFit = ImageCDNFit.contain,
  12. ImageCDNFormat resizerFormat = ImageCDNFormat.webp,
  13. int? resizerHeight,
  14. int? resizerWidth,
  15. Map<String, String>? httpHeaders,
  16. ImageWidgetBuilder? imageBuilder,
  17. ProgressIndicatorBuilder? progressIndicatorBuilder,
  18. Duration? fadeOutDuration = const Duration(milliseconds: 1000),
  19. Curve fadeOutCurve = Curves.easeOut,
  20. Duration fadeInDuration = const Duration(milliseconds: 500),
  21. Curve fadeInCurve = Curves.easeIn,
  22. double? width,
  23. double? height,
  24. BoxFit? fit,
  25. ImageRepeat repeat = ImageRepeat.noRepeat,
  26. bool matchTextDirection = false,
  27. BaseCacheManager? cacheManager,
  28. bool useOldImageOnUrlChange = false,
  29. Color? color,
  30. FilterQuality filterQuality = FilterQuality.low,
  31. BlendMode? colorBlendMode,
  32. Duration? placeholderFadeInDuration,
  33. int? memCacheWidth,
  34. int? memCacheHeight,
  35. String? cacheKey,
  36. int? maxWidthDiskCache,
  37. int? maxHeightDiskCache,
  38. ImageRenderMethodForWeb imageRenderMethodForWeb = ImageRenderMethodForWeb.HtmlImage,
})

Implementation

ProgressiveCachedNetworkImage(
  this.url, {
  super.key,
  Alignment alignment = Alignment.center,
  this.progressivePlaceholder,
  this.progressiveBlur = 2,
  this.progressiveErrorPlaceholder,
  this.progressiveResizeHeight,
  this.progressiveResizeWidth,
  this.progressiveResizerFit = ImageCDNFit.contain,
  this.progressiveResizerFormat = ImageCDNFormat.webp,

  // CachedNetworkImage params
  super.resizerFit,
  super.resizerFormat,
  super.resizerHeight,
  super.resizerWidth,
  super.httpHeaders,
  super.imageBuilder,
  super.progressIndicatorBuilder,
  super.fadeOutDuration,
  super.fadeOutCurve,
  super.fadeInDuration,
  super.fadeInCurve,
  super.width,
  super.height,
  super.fit,
  super.repeat,
  super.matchTextDirection,
  super.cacheManager,
  super.useOldImageOnUrlChange,
  super.color,
  super.filterQuality,
  super.colorBlendMode,
  super.placeholderFadeInDuration,
  super.memCacheWidth,
  super.memCacheHeight,
  super.cacheKey,
  super.maxWidthDiskCache,
  super.maxHeightDiskCache,
  super.imageRenderMethodForWeb,
}) : super(
        url,
        placeholder: (context, urlPlaceholder) => _smallPlaceholder(
          url,
          fit: fit,
          alignment: alignment,
          progressiveErrorPlaceholder: progressiveErrorPlaceholder,
          progressivePlaceholder: progressivePlaceholder,
          broken: false,
          resizeHeight: progressiveResizeWidth,
          resizeWidth: progressiveResizeHeight,
          blurDensity: progressiveBlur,
          resizerFormat: progressiveResizerFormat,
          resizerFit: progressiveResizerFit,
        ),
        errorWidget: progressiveErrorPlaceholder,
      );