ImageView.remote constructor
const
ImageView.remote(
- String? imageUrl, {
- Key? key,
- double? width,
- double? height,
- double? size,
- int? cacheWidth,
- int? cacheHeight,
- int? cacheSize,
- BoxFit? fit,
- Color? color,
- Widget? errorWidget,
- Widget? placeholder,
- EdgeInsets? padding,
- EdgeInsets? margin,
- String? darkImagePath,
- bool autoDarkMode = false,
- bool autoApplyKey = true,
- BoxDecoration? decoration,
- BoxDecoration? foregroundDecoration,
- Clip? clipBehavior = Clip.hardEdge,
- double? aspectRatio,
- BorderRadius? borderRadius,
- BoxShape? shape,
- BlendMode? colorBlendMode,
- 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',
);