FastImg constructor

const FastImg({
  1. Key? key,
  2. Widget? error,
  3. required String path,
  4. FastImgType type = FastImgType.network,
  5. double? height,
  6. double? width,
  7. BoxFit? boxFit,
  8. double radius = 10,
})

FastImg is a widget to show images from network, assets or files.

path is the path of the image.

type is the type of the image, can be FastImgType.network, FastImgType.asset or FastImgType.file.

error is the widget to show when the image is not loaded.

width is the width of the image.

height is the height of the image.

boxFit is the box fit of the image.

radius is the radius of the image.

example:

 FastImg(
  path: 'https://picsum.photos/200/300',
  type: FastImgType.network,
  width: 200,
  height: 300,
  boxFit: BoxFit.cover,
  radius: 10,
)

Implementation

const FastImg({
  super.key,
  this.error,
  required this.path,
  this.type = FastImgType.network,
  this.height,
  this.width,
  this.boxFit,
  this.radius = 10,
});