progressive_cached_network_image_cdn 1.0.0 progressive_cached_network_image_cdn: ^1.0.0 copied to clipboard
Load images from network and cache them with cached_network_image and resize it with ImageCDN
Progressive Cached Network Image CDN #
Load image from network and cache them with cached_network_image and resize it with ImageCDN (Server side).
This plugin was extended from cached_network_image plugin
ImageCDN #
You can convert your image's url with
///return String
ImageCDN.convertUrl("IMAGE_URL", {
int? width,
int? height,
ImageCDNFit fit = ImageCDNFit.contain,
ImageCDNFormat format = ImageCDNFormat.webp
})
CachedNetworkImageCDN #
This is extended with CachedNetworkImage
, means you can use all params that related with the widget
CachedNetworkImageCDN(
"IMAGE_URL",
this.resizerFormat = ImageCDNFormat.webp,
this.resizerFit = ImageCDNFit.contain,
this.resizerWidth,
this.resizerHeight,
),
ProgressiveCachedNetworkImage #
This is extended with CachedNetworkImageCDN
, means you can use all params that related with the widget
ProgressiveCachedNetworkImage(
"IMAGE_URL",
this.progressivePlaceholder,
this.progressiveBlur = 2,
this.progressiveErrorPlaceholder,
this.progressiveResizeHeight,
this.progressiveResizeWidth,
this.progressiveResizerFit = ImageCDNFit.contian,
this.progressiveResizerFormat = ImageCDNFormat.webp,
)
Extensions #
You can directly resize your CachedNetworkImage by adding
///Make sure you already import the plugin
import 'package:progressive_cached_network_image_cdn/progressive_cached_network_image_cdn.dart';
CachedNetworkImage( ... ).resizeImage(
width: width,
height: height,
fit: fit,
format: format,
)
Love my work? #
I will be so happy if you give a 👍 or maybe a cup of ☕️ 😊