resizeImage method
Widget
resizeImage({
- int? width,
- int? height,
- ImageCDNFit fit = ImageCDNFit.contain,
- 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,
));
}