YImage2 function
Implementation
Widget YImage2(double? width, double? height, String url, {BoxFit fit = BoxFit.contain, String? imagePlaceHolder}) {
if (yIsNullOrEmpty(url)) return Image.asset(yIsNullOrEmpty(imagePlaceHolder) ? YConfig.imagePlaceHolder : imagePlaceHolder!, width: width, height: height, fit: fit);
return FadeInImage.assetNetwork(placeholder: yIsNullOrEmpty(imagePlaceHolder) ? YConfig.imagePlaceHolder : imagePlaceHolder!, image: url, width: width, height: height, fit: fit);
// return FadeInImage.memoryNetwork(placeholder: kTransparentImage, image: url, width: width, height: height, fit: fit);
}