loadImage static method

Widget loadImage(
  1. String? imgPath, {
  2. Key? key,
  3. BorderRadius radius = BorderRadius.zero,
  4. String placeholder = "none",
  5. double? width,
  6. double? height,
  7. BoxFit fit = BoxFit.cover,
  8. String? package,
})

Implementation

static Widget loadImage(String? imgPath,
    {Key? key,BorderRadius radius:BorderRadius.zero,String placeholder : "none",
      double? width, double? height, BoxFit fit: BoxFit.cover,String? package}){
  // LogUtil.e('loadImage-->imgPath==$imgPath');
  if((imgPath??'').startsWith('http')){
   return loadNetworkImage(imgPath,key:key,width: width,height: height,radius: radius,fit: fit,placeholder: placeholder);
  }else{
    return loadAssetImage(imgPath,key: key,width: width,height: height,radius: radius,fit: fit,package: package);
  }
}