0 purchases
auto resize image
AutoResizeImage #
Language: English| 中文简体
Automatically adjust the image cache size based on the size of the widget.
Features #
Supports various types of ImageProviders including NetworkImage, AssetImage, FileImage, etc.
Supports CachedNetworkImageProvider
debugInvertOversizedImages = false
debugInvertOversizedImages = true
Usage #
auto_resize_image:1.0.0
copied to clipboard
SizedBox(
width: 200,
height: 200,
child: LayoutBuilder(
builder: (BuildContext context, BoxConstraints constraints) {
return Image(
fit: BoxFit.cover,
image: AutoResizeImage(
imageProvider: CachedNetworkImageProvider(url),
width: constraints.maxWidth,
height: constraints.maxHeight,
),
);
},
),
),
copied to clipboard
Additional information #
The green box represents the size of the widget, while the red box represents the size of the image cache.
ResizeMode
Illustration
Clarity/Memory Usage
Oversized
contain
Low
No
balance
Medium
No
cover
High
Yes
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.