networkImages static method

dynamic networkImages(
  1. dynamic url,
  2. dynamic errorImagePath, {
  3. dynamic shape,
  4. dynamic placeHolder,
  5. dynamic errorWidget,
  6. dynamic height,
  7. dynamic width,
})

Implementation

static networkImages(url,errorImagePath,{shape, placeHolder, errorWidget, height, width}) {
  return CachedNetworkImage(
    imageUrl: url,
    imageBuilder: (context, imageProvider) => Container(
      height: height ?? 100,
      width: width ?? 100,
      decoration: BoxDecoration(
        shape: shape ?? BoxShape.circle,
        image: DecorationImage(
          image: imageProvider,
          fit: BoxFit.cover,
        ),
      ),
    ),
    errorWidget:(context,errorImagePath,_)=> assetImage(image: errorImagePath),
    placeholder: (context, url) =>
        placeHolder ??
        const ShimmerWidget.circular(width: 100.0, height: 100.0),
    // errorWidget: (context, url, error) =>
  );
}