progressive_cached_network_image_cdn 1.0.0+1 progressive_cached_network_image_cdn: ^1.0.0+1 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 with cached_network_image and resize it with ImageCDN (Server side).
You also can use ProgressiveCachedNetworkImage
to load progressive images by loading small size image and show it as placeholder before origin image got loaded.
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
///You can use this params for resize the image with ImageCDN
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
///You can use this params for customize your Progressive Placeholder that provided by ImageCDN
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 ☕️ 😊