ImageView.remote constructor

const ImageView.remote(
  1. String? imageUrl, {
  2. Key? key,
  3. double? width,
  4. double? height,
  5. double? size,
  6. int? cacheWidth,
  7. int? cacheHeight,
  8. int? cacheSize,
  9. BoxFit? fit,
  10. Color? color,
  11. Widget? errorWidget,
  12. Widget? placeholder,
  13. EdgeInsets? padding,
  14. EdgeInsets? margin,
  15. String? darkImagePath,
  16. bool autoDarkMode = false,
  17. bool autoApplyKey = true,
  18. BoxDecoration? decoration,
  19. BoxDecoration? foregroundDecoration,
  20. Clip? clipBehavior = Clip.hardEdge,
  21. double? aspectRatio,
  22. BorderRadius? borderRadius,
  23. BoxShape? shape,
  24. BlendMode? colorBlendMode,
  25. double? scale,
})

Implementation

const ImageView.remote(
  this.imageUrl, {
  super.key,
  this.width,
  this.height,
  this.size,
  this.cacheWidth,
  this.cacheHeight,
  this.cacheSize,
  this.fit,
  this.color,
  this.errorWidget,
  this.placeholder,
  this.padding,
  this.margin,
  this.darkImagePath,
  this.autoDarkMode = false,
  this.autoApplyKey = true,
  this.decoration,
  this.foregroundDecoration,
  this.clipBehavior = Clip.hardEdge,
  this.aspectRatio,
  this.borderRadius,
  this.shape,
  this.colorBlendMode,
  this.scale,
})  : imagePath = null,
      assert(
        (darkImagePath != null && autoDarkMode == false) ||
            darkImagePath == null,
        '不能同时设置darkImagePath和autoDarkMode',
      );