NikuImage.asset constructor
NikuImage.asset(
- String name, {
- Key? key,
- ImageFrameBuilder? frameBuilder,
- ImageLoadingBuilder? loadingBuilder,
- ImageErrorWidgetBuilder? errorBuilder,
- double? width,
- double? height,
- Color? color,
- Animation<
double> ? opacity, - FilterQuality? filterQuality,
- BlendMode? colorBlendMode,
- BoxFit? fit,
- AlignmentGeometry? alignment,
- ImageRepeat? repeat,
- Rect? centerSlice,
- bool? matchTextDirection,
- bool? gaplessPlayback,
- String? semanticLabel,
- bool? excludeFromSemantics,
- bool? isAntiAlias,
- Map<
String, String> ? headers, - int? cacheWidth,
- int? cacheHeight,
- double? scale,
- String? package,
- AssetBundle? bundle,
Implementation
factory NikuImage.asset(
String name, {
Key? key,
ImageFrameBuilder? frameBuilder,
ImageLoadingBuilder? loadingBuilder,
ImageErrorWidgetBuilder? errorBuilder,
double? width,
double? height,
Color? color,
Animation<double>? opacity,
FilterQuality? filterQuality,
BlendMode? colorBlendMode,
BoxFit? fit,
AlignmentGeometry? alignment,
ImageRepeat? repeat,
Rect? centerSlice,
bool? matchTextDirection,
bool? gaplessPlayback,
String? semanticLabel,
bool? excludeFromSemantics,
bool? isAntiAlias,
Map<String, String>? headers,
int? cacheWidth,
int? cacheHeight,
double? scale,
String? package,
AssetBundle? bundle,
}) =>
NikuImage(
ResizeImage.resizeIfNeeded(
cacheWidth,
cacheHeight,
scale != null
? ExactAssetImage(name,
bundle: bundle, scale: scale, package: package)
: AssetImage(name, bundle: bundle, package: package),
),
key: key,
frameBuilder: frameBuilder,
loadingBuilder: loadingBuilder,
errorBuilder: errorBuilder,
width: width,
height: height,
color: color,
opacity: opacity,
filterQuality: filterQuality,
colorBlendMode: colorBlendMode,
fit: fit,
alignment: alignment,
repeat: repeat,
centerSlice: centerSlice,
matchTextDirection: matchTextDirection,
gaplessPlayback: gaplessPlayback,
semanticLabel: semanticLabel,
excludeFromSemantics: excludeFromSemantics,
isAntiAlias: isAntiAlias,
);