fotoBuild method

Widget fotoBuild(
  1. BuildContext context
)

Implementation

Widget fotoBuild(BuildContext context){
  if (imageUrl == "${Config().baseUrlWebview}${Config.imageUploadingnowCommunity}"){
    return UploadingNowImage(
      key: UniqueKey(),
      fullSize: fullSize,
      height: height,
      width: width,
    );
  }else{
    return Container(
        margin: margin,
        clipBehavior: Clip.antiAliasWithSaveLayer,
        decoration: BoxDecoration(
          borderRadius: BorderRadius.all(
              Radius.circular(circle == null ? 0 : circle!)),
        ),
        child:
        // isGif != null ?
        cover != null && imageUrl!.contains("default-profile-picture") ? Container(
          color: Colors.grey.shade300,
        ) :
        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,
            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: Colors.orange,
                  )
                ] ,
              ),
            ),
            errorWidget: (context, url, error) => Container(
              width: width,
              height: height,
              color: Colors.grey.shade400,
              padding: const EdgeInsets.all(8),
            ))
      // :
      // Container(
      //   height: height,
      //   width: width,
      //   decoration: BoxDecoration(
      //       color: colorbackground != null ? colorbackground : Colors.white,
      //       borderRadius: BorderRadius.circular(circle != null ? circle : 0),
      //       image: DecorationImage(
      //           image:
      //           NetworkImage(imageUrl),
      //           fit: BoxFit.cover)),
      // )
    );
  }
}