showPicture function
Implementation
Widget showPicture(String path, {double height = 150}) {
if (path.contains('.json')) {
return Lottie.asset(
path,
height: height,
fit: BoxFit.fitHeight,
);
} else if (path.contains('.png') || path.contains('.jpg')) {
return Image.asset(
path,
height: height,
fit: BoxFit.fitHeight,
);
} else if (path.contains('.svg')) {
return SvgPicture.asset(
path,
height: height,
fit: BoxFit.fitHeight,
);
}
return FlutterLogo(
size: height,
);
}