ImageExt constructor
const
ImageExt({
- Key? key,
- required ImageProvider<
Object> image, - CustomImageBuilder? imageBuilder,
- ImageFrameBuilder? frameBuilder,
- ImageLoadingBuilder? loadingBuilder,
- ImageErrorWidgetBuilder? errorBuilder,
- String? semanticLabel,
- bool excludeFromSemantics = false,
- double? width,
- double? height,
- Color? color,
- Animation<
double> ? opacity, - BlendMode? colorBlendMode,
- BoxFit? fit,
- AlignmentGeometry alignment = Alignment.center,
- ImageRepeat repeat = ImageRepeat.noRepeat,
- Rect? centerSlice,
- bool matchTextDirection = false,
- bool gaplessPlayback = false,
- bool isAntiAlias = false,
- bool scrollAwareEnable = false,
- FilterQuality filterQuality = FilterQuality.low,
Creates a widget that displays an image.
To show an image from the network or from an asset bundle, consider using Image.network and Image.asset respectively.
The image, alignment, repeat, and matchTextDirection arguments
must not be null.
Either the width and height arguments should be specified, or the
widget should be placed in a context that sets tight layout constraints.
Otherwise, the image dimensions will change as the image is loaded, which
will result in ugly layout changes.
Use filterQuality to specify the rendering quality of the image.
If excludeFromSemantics is true, then semanticLabel will be ignored.
Implementation
const ImageExt({
Key? key,
required this.image,
this.imageBuilder,
this.frameBuilder,
this.loadingBuilder,
this.errorBuilder,
this.semanticLabel,
this.excludeFromSemantics = false,
this.width,
this.height,
this.color,
this.opacity,
this.colorBlendMode,
this.fit,
this.alignment = Alignment.center,
this.repeat = ImageRepeat.noRepeat,
this.centerSlice,
this.matchTextDirection = false,
this.gaplessPlayback = false,
this.isAntiAlias = false,
this.scrollAwareEnable = false,
this.filterQuality = FilterQuality.low,
}) : assert(image != null),
assert(alignment != null),
assert(repeat != null),
assert(filterQuality != null),
assert(matchTextDirection != null),
assert(isAntiAlias != null),
super(key: key);