BaseImage constructor

const BaseImage({
  1. Key? key,
  2. required String url,
  3. double width = double.infinity,
  4. double? height,
  5. double? maxWidth,
  6. double? maxHeight,
  7. BoxFit fit = BoxFit.cover,
  8. double radius = 0,
  9. Color? baseColor = const Color(0xFFDEE6FD),
  10. Color? highlightColor,
  11. bool? noLoading = false,
  12. bool showThumbnail = false,
  13. bool autoHeight = false,
  14. double? aspectRatio,
})

Implementation

const BaseImage({
  super.key,
  required this.url,
  this.width = double.infinity,
  this.height,
  this.maxWidth,
  this.maxHeight,
  this.fit = BoxFit.cover,
  this.radius = 0,
  this.baseColor = const Color(0xFFDEE6FD),
  this.highlightColor,
  this.noLoading = false,
  // 是否显示缩略图
  this.showThumbnail = false,
  // 自动高度模式 - 根据图片原始尺寸自动计算高度
  this.autoHeight = false,
  // 宽高比模式 - 根据宽高比计算高度
  this.aspectRatio,
});