BaseImage.asset constructor
const
BaseImage.asset(
- String assetPath, {
- Key? key,
- 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,
展示 assets 中的静态图片
Implementation
const BaseImage.asset(
String assetPath, {
super.key,
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,
}) : url = assetPath;