imageFromPath function
Implementation
Image imageFromPath(
String path, {
BoxFit? fit,
double? width,
double? height,
}) {
if (isAssetPath(path)) {
return Image.asset(
path,
fit: fit,
width: width,
height: height,
);
} else {
return Image.file(
File(path),
fit: fit,
width: width,
height: height,
);
}
}