copyWith method

Widget copyWith({
  1. String? imageUrl,
  2. String? cacheKey,
  3. ImageWidgetBuilder? imageBuilder,
  4. PlaceholderWidgetBuilder? placeholder,
  5. ProgressIndicatorBuilder? progressIndicatorBuilder,
  6. LoadingErrorWidgetBuilder? errorWidget,
  7. Duration? placeholderFadeInDuration,
  8. Duration? fadeOutDuration,
  9. Curve? fadeOutCurve,
  10. Duration? fadeInDuration,
  11. Curve? fadeInCurve,
  12. double? width,
  13. double? height,
  14. BoxFit? fit,
  15. Alignment? alignment,
  16. ImageRepeat? repeat,
  17. bool? matchTextDirection,
  18. Map<String, String>? httpHeaders,
  19. bool? useOldImageOnUrlChange,
  20. Color? color,
  21. BlendMode? colorBlendMode,
  22. FilterQuality? filterQuality,
  23. int? memCacheWidth,
  24. int? memCacheHeight,
  25. int? maxWidthDiskCache,
  26. int? maxHeightDiskCache,
})

Implementation

Widget copyWith({
  String? imageUrl,
  String? cacheKey,
  ImageWidgetBuilder? imageBuilder,
  PlaceholderWidgetBuilder? placeholder,
  ProgressIndicatorBuilder? progressIndicatorBuilder,
  LoadingErrorWidgetBuilder? errorWidget,
  Duration? placeholderFadeInDuration,
  Duration? fadeOutDuration,
  Curve? fadeOutCurve,
  Duration? fadeInDuration,
  Curve? fadeInCurve,
  double? width,
  double? height,
  BoxFit? fit,
  Alignment? alignment,
  ImageRepeat? repeat,
  bool? matchTextDirection,
  Map<String, String>? httpHeaders,
  bool? useOldImageOnUrlChange,
  Color? color,
  BlendMode? colorBlendMode,
  FilterQuality? filterQuality,
  int? memCacheWidth,
  int? memCacheHeight,
  int? maxWidthDiskCache,
  int? maxHeightDiskCache,
}) {
  return CachedNetworkImage(
    imageUrl: imageUrl ?? this.imageUrl,
    cacheKey: cacheKey ?? this.cacheKey,
    imageBuilder: imageBuilder ?? this.imageBuilder,
    placeholder: placeholder ?? this.placeholder,
    progressIndicatorBuilder:
        progressIndicatorBuilder ?? this.progressIndicatorBuilder,
    errorWidget: errorWidget ?? this.errorWidget,
    placeholderFadeInDuration:
        placeholderFadeInDuration ?? this.placeholderFadeInDuration,
    fadeOutDuration: fadeOutDuration ?? this.fadeOutDuration,
    fadeOutCurve: fadeOutCurve ?? this.fadeOutCurve,
    fadeInDuration: fadeInDuration ?? this.fadeInDuration,
    fadeInCurve: fadeInCurve ?? this.fadeInCurve,
    width: width ?? this.width,
    height: height ?? this.height,
    fit: fit ?? this.fit,
    alignment: alignment ?? this.alignment,
    repeat: repeat ?? this.repeat,
    matchTextDirection: matchTextDirection ?? this.matchTextDirection,
    httpHeaders: httpHeaders ?? this.httpHeaders,
    useOldImageOnUrlChange:
        useOldImageOnUrlChange ?? this.useOldImageOnUrlChange,
    color: color ?? this.color,
    colorBlendMode: colorBlendMode ?? this.colorBlendMode,
    filterQuality: filterQuality ?? this.filterQuality,
    memCacheWidth: memCacheWidth ?? this.memCacheWidth,
    memCacheHeight: memCacheHeight ?? this.memCacheHeight,
    maxWidthDiskCache: maxWidthDiskCache ?? this.maxWidthDiskCache,
    maxHeightDiskCache: maxHeightDiskCache ?? this.maxHeightDiskCache,
  );
}