BaseImage.dynamic constructor

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

Implementation

BaseImage.dynamic(
  dynamic image, {
  super.key,
  super.semanticLabel,
  super.excludeFromSemantics = false,
  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.filterQuality = FilterQuality.low,
  super.border,
  super.shape = BoxShape.rectangle,
  super.borderRadius = const BorderRadius.all(Radius.circular(2)),
  super.clipBehavior = Clip.antiAlias,
  super.enableLoadState = true,
  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.isAntiAlias = false,
  super.handleLoadingProgress = false,
  super.layoutInsets = EdgeInsets.zero,
  Widget? failed,
  Widget? loading,
  int? cacheWidth,
  int? cacheHeight,
  double? compressionRatio,
  int? maxBytes,
  bool cacheRawData = false,
  String? imageCacheName,
  double scale = 1.0,

  /// [ExtendedNetworkImageProvider]
  Map<String, String>? headers,
  bool cache = true,
  int retries = 3,
  Duration? timeLimit,
  Duration timeRetry = const Duration(milliseconds: 100),
  CancellationToken? cancelToken,
  String? cacheKey,
  bool printError = true,
  Duration? cacheMaxAge,

  /// [ExtendedAssetImageProvider]
  AssetBundle? bundle,
  String? package,
}) : super(
          image: BaseResizeImage.buildImageProvider(image,
              cacheWidth: cacheWidth,
              cacheHeight: cacheHeight,
              maxBytes: maxBytes,
              compressionRatio: compressionRatio,
              cacheRawData: cacheRawData,
              imageCacheName: imageCacheName,
              scale: scale,
              headers: headers,
              cache: cache,
              cancelToken: cancelToken,
              retries: retries,
              timeRetry: timeRetry,
              timeLimit: timeLimit,
              cacheKey: cacheKey,
              printError: printError,
              cacheMaxAge: cacheMaxAge,
              bundle: bundle,
              package: package),
          loadStateChanged:
              buildLoadStateChanged(failed: failed, loading: loading));