FastImg constructor
const
FastImg({})
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,
});