BasicImage.asset constructor

BasicImage.asset(
  1. String? name, {
  2. Key? key,
  3. AssetBundle? bundle,
  4. String? semanticLabel,
  5. bool excludeFromSemantics = false,
  6. double? scale,
  7. double? width,
  8. double? height,
  9. Color? color,
  10. Animation<double>? opacity,
  11. BlendMode? colorBlendMode,
  12. BoxFit? fit = BoxFit.cover,
  13. AlignmentGeometry alignment = Alignment.center,
  14. ImageRepeat repeat = ImageRepeat.noRepeat,
  15. Rect? centerSlice,
  16. bool matchTextDirection = false,
  17. bool gaplessPlayback = false,
  18. String? package,
  19. FilterQuality filterQuality = FilterQuality.low,
  20. BoxShape? shape = BoxShape.rectangle,
  21. BoxBorder? border,
  22. BorderRadius? borderRadius = const BorderRadius.all(Radius.circular(2)),
  23. Clip clipBehavior = Clip.antiAlias,
  24. bool enableLoadState = false,
  25. BeforePaintImage? beforePaintImage,
  26. AfterPaintImage? afterPaintImage,
  27. ExtendedImageMode mode = ExtendedImageMode.none,
  28. bool enableMemoryCache = true,
  29. bool clearMemoryCacheIfFailed = true,
  30. DoubleTap? onDoubleTap,
  31. InitGestureConfigHandler? initGestureConfigHandler,
  32. bool enableSlideOutPage = false,
  33. BoxConstraints? constraints,
  34. Key? extendedImageEditorKey,
  35. InitEditorConfigHandler? initEditorConfigHandler,
  36. HeroBuilderForSlidingPage? heroBuilderForSlidingPage,
  37. bool clearMemoryCacheWhenDispose = false,
  38. Key? extendedImageGestureKey,
  39. int? cacheWidth,
  40. int? cacheHeight,
  41. bool isAntiAlias = false,
  42. double? compressionRatio,
  43. int? maxBytes,
  44. bool cacheRawData = false,
  45. String? imageCacheName,
  46. EdgeInsets layoutInsets = EdgeInsets.zero,
  47. Widget? failed,
  48. Widget? loading,
})

Implementation

BasicImage.asset(
  String? name, {
  super.key,
  super.bundle,
  super.semanticLabel,
  super.excludeFromSemantics = false,
  super.scale,
  super.width,
  super.height,
  super.color,
  super.opacity,
  super.colorBlendMode,
  super.fit = BoxFit.cover,
  super.alignment = Alignment.center,
  super.repeat = ImageRepeat.noRepeat,
  super.centerSlice,
  super.matchTextDirection = false,
  super.gaplessPlayback = false,
  super.package,
  super.filterQuality = FilterQuality.low,
  super.shape = BoxShape.rectangle,
  super.border,
  super.borderRadius = const BorderRadius.all(Radius.circular(2)),
  super.clipBehavior = Clip.antiAlias,
  super.enableLoadState = false,
  super.beforePaintImage,
  super.afterPaintImage,
  super.mode = ExtendedImageMode.none,
  super.enableMemoryCache = true,
  super.clearMemoryCacheIfFailed = true,
  super.onDoubleTap,
  super.initGestureConfigHandler,
  super.enableSlideOutPage = false,
  super.constraints,
  super.extendedImageEditorKey,
  super.initEditorConfigHandler,
  super.heroBuilderForSlidingPage,
  super.clearMemoryCacheWhenDispose = false,
  super.extendedImageGestureKey,
  super.cacheWidth,
  super.cacheHeight,
  super.isAntiAlias = false,
  super.compressionRatio,
  super.maxBytes,
  super.cacheRawData = false,
  super.imageCacheName,
  super.layoutInsets = EdgeInsets.zero,
  Widget? failed,
  Widget? loading,
}) : super.asset(name ?? 'asset name is null',
          loadStateChanged:
              buildLoadStateChanged(failed: failed, loading: loading));