BaseImage.file constructor

BaseImage.file(
  1. File file, {
  2. Key? key,
  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

BaseImage.file(
  File file, {
  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 = file.path;