Image.asset constructor
Image.asset(
- String name, {
- Key? key,
- AssetBundle? bundle,
- Widget frameBuilder(
- BuildContext,
- Widget,
- int?,
- bool,
- Widget errorBuilder()?,
- String? semanticLabel,
- bool excludeFromSemantics = false,
- double? scale,
- double? width,
- double? height,
- Color? color,
- 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,
- String? package,
- FilterQuality filterQuality = FilterQuality.medium,
- int? cacheWidth,
- int? cacheHeight,
Implementation
Image.asset(
String name, {
super.key,
AssetBundle? bundle,
this.frameBuilder,
this.errorBuilder,
this.semanticLabel,
this.excludeFromSemantics = false,
double? scale,
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,
String? package,
this.filterQuality = FilterQuality.medium,
this.cacheWidth,
this.cacheHeight,
}) : image = AssetImage(
name,
bundle: bundle,
package: package,
);