widgetEndFoto method
Implementation
widgetEndFoto(BuildContext context){
return CachedNetworkImage(
maxHeightDiskCache: isDetail != null ? null : persen2,
maxWidthDiskCache: isDetail != null? null : persen,
memCacheHeight: isDetail != null ? null : persen2,
memCacheWidth: isDetail != null ? null : persen,
fadeInDuration: Duration(seconds: 1),
fadeOutDuration: Duration(seconds: 1),
height: height,
width: width,
imageUrl: Helper.checkTrueURL(imageUrl!),
fit: boxFit == null ? BoxFit.cover : boxFit,
progressIndicatorBuilder: (context,url,downloadProgress) => Container(
width: width,
height: height,
alignment: Alignment.center,
child: Stack(
alignment: Alignment.center,
children: [
Container(
width: width,
height: height,
alignment: Alignment.center,
color: Colors.grey.shade200,
padding: const EdgeInsets.all(8),
child: isProfile != null ? Image.asset(Assets.ic_blank_pic,width: width,height: height) : Image.asset(isProfile == null ? Assets.ic_placeholder_product : Assets.ic_blank_pic,width: width,height: height,color: Colors.grey),
),
CircularProgressIndicator(
color: Config.colorPrimary ?? Colors.orange,
value: downloadProgress.progress),
],
),
),
// placeholder: (context, url) => Container(
// width: width,
// height: height,
// alignment: Alignment.center,
// child: isKategory != null ? Image.asset(Assets.backgroundNewicon,height: height,width: width,) : Stack(
// alignment: Alignment.center,
// children:[
// Container(
// width: width,
// height: height,
// alignment: Alignment.center,
// color: Colors.grey.shade200,
// padding: const EdgeInsets.all(8),
// child: isProfile != null ? Image.asset(Assets.ic_blank_pic,width: width,height: height) : Image.asset(isProfile == null ? Assets.ic_placeholder_product : Assets.ic_blank_pic,width: width,height: height,color: Colors.grey),
// ),
// // CircularProgressIndicator(
// // color: Config.colorPrimary ?? Colors.orange,
// // )
// ] ,
// ),
// ),
errorWidget: (context, url, error) => Container(
width: width,
height: height,
color: Colors.grey.shade400,
padding: const EdgeInsets.all(8),
));
}