resizeImage method

Widget resizeImage({
  1. int? width,
  2. int? height,
  3. ImageCDNFit fit = ImageCDNFit.contain,
  4. ImageCDNFormat format = ImageCDNFormat.webp,
})

Resize the image to the desired size with ImageCDN service. This will return a new CachedNetworkImage with the new url.

resizerWidth and resizerHeight are required as pixels size.

Implementation

Widget resizeImage(
    {int? width,
    int? height,
    ImageCDNFit fit = ImageCDNFit.contain,
    ImageCDNFormat format = ImageCDNFormat.webp}) {
  return copyWith(
      imageUrl: ImageCDN.convertUrl(
    imageUrl,
    width: width,
    height: height,
    fit: fit,
    format: format,
  ));
}