BaseImage constructor
const
BaseImage({
- Key? key,
- required String url,
- double width = double.infinity,
- double? height,
- double? maxWidth,
- double? maxHeight,
- BoxFit fit = BoxFit.cover,
- double radius = 0,
- Color? baseColor = const Color(0xFFDEE6FD),
- Color? highlightColor,
- bool? noLoading = false,
- bool showThumbnail = false,
- bool autoHeight = false,
- 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,
});