ImageParams constructor

const ImageParams({
  1. double? width,
  2. double? height,
  3. double? size,
  4. @igFreezedJson BoxFit? fit,
  5. @igFreezedJson BorderRadius? borderRadius,
  6. @igFreezedJson BoxShape? shape,
  7. @Default(true) bool enableMemoryCache,
  8. String? heroTag,
  9. @Default(false) bool isSelected,
  10. @igFreezedJson Widget? errorWidget,
  11. @igFreezedJson VoidCallback? onTap,
  12. @igFreezedJson Color? color,
  13. @Default(true) bool clearMemoryCacheIfFailed,
  14. @Default(true) bool gaplessPlayback,
  15. @igFreezedJson BlendMode? colorBlendMode,
  16. double? scale,
  17. @Default({}) Map<String, String> headers,
  18. @Default(true) bool cache,
  19. @Default(3) int retries,
  20. @igFreezedJson Duration? timeLimit,
  21. @igFreezedJson @Default(Duration(seconds: 3)) Duration timeRetry,
  22. @igFreezedJson CancellationToken? cancelToken,
  23. String? cacheKey,
  24. @Default(false) bool printError,
  25. @Default(true) bool cacheRawData,
  26. String? imageCacheName,
  27. @igFreezedJson Duration? cacheMaxAge,
  28. int? cacheWidth,
  29. int? cacheHeight,
  30. double? compressionRatio,
  31. int? maxBytes,
  32. String? package,
  33. @igFreezedJson AssetBundle? bundle,
  34. @Doc(message: '自定义完成小部件') @igFreezedJson CustomCompletedWidget? customCompletedWidget,
  35. @igFreezedJson Widget? customLoadingWidget,
  36. @igFreezedJson InitEditorConfigHandler? initEditorConfigHandler,
})

Implementation

const factory ImageParams({double? width,
  double? height,
  double? size,
  @igFreezedJson BoxFit? fit,
  @igFreezedJson BorderRadius? borderRadius,
  @igFreezedJson BoxShape? shape,
  @Default(true) bool enableMemoryCache,
  String? heroTag,
  @Default(false) bool isSelected,
  @igFreezedJson Widget? errorWidget,
  @igFreezedJson VoidCallback? onTap,
  @igFreezedJson Color? color,
  @Default(true) bool clearMemoryCacheIfFailed,
  @Default(true) bool gaplessPlayback,
  @igFreezedJson BlendMode? colorBlendMode,

  //---net
  double? scale,
  @Default({}) Map<String, String> headers,
  @Default(true) bool cache,
  @Default(3) int retries,
  @igFreezedJson Duration? timeLimit,
  @igFreezedJson @Default(Duration(seconds: 3)) Duration timeRetry,
  @igFreezedJson CancellationToken? cancelToken,
  String? cacheKey,
  @Default(false) bool printError,
  @Default(true) bool cacheRawData,
  String? imageCacheName,
  @igFreezedJson Duration? cacheMaxAge,
  int? cacheWidth,
  int? cacheHeight,
  double? compressionRatio,
  int? maxBytes,
  String? package,
  @igFreezedJson AssetBundle? bundle,
  @Doc(message: '自定义完成小部件') @igFreezedJson CustomCompletedWidget? customCompletedWidget,
  @igFreezedJson Widget? customLoadingWidget,
  @igFreezedJson InitEditorConfigHandler? initEditorConfigHandler
}) = _ImageParams;