NikuImage.asset constructor

NikuImage.asset(
  1. String name, {
  2. Key? key,
  3. ImageFrameBuilder? frameBuilder,
  4. ImageLoadingBuilder? loadingBuilder,
  5. ImageErrorWidgetBuilder? errorBuilder,
  6. double? width,
  7. double? height,
  8. Color? color,
  9. Animation<double>? opacity,
  10. FilterQuality? filterQuality,
  11. BlendMode? colorBlendMode,
  12. BoxFit? fit,
  13. AlignmentGeometry? alignment,
  14. ImageRepeat? repeat,
  15. Rect? centerSlice,
  16. bool? matchTextDirection,
  17. bool? gaplessPlayback,
  18. String? semanticLabel,
  19. bool? excludeFromSemantics,
  20. bool? isAntiAlias,
  21. Map<String, String>? headers,
  22. int? cacheWidth,
  23. int? cacheHeight,
  24. double? scale,
  25. String? package,
  26. 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,
    );