auto_resize_image 1.0.0 copy "auto_resize_image: ^1.0.0" to clipboard
auto_resize_image: ^1.0.0 copied to clipboard

Automatically resize the cached `ResizeImage` based on the size of the `widget`.

AutoResizeImage #

Language: English| 中文简体

Automatically resize the cached ResizeImage based on the size of the widget.

Features #

Supports various types of ImageProviders including NetworkImage, AssetImage, FileImage, etc.

Supports CachedNetworkImageProvider

debugInvertOversizedImages = false debugInvertOversizedImages = true
Screenshot_20240227-183452.jpg Screenshot_20240228-095622.jpg

Usage #

auto_resize_image:1.0.0
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,
        ),
      );
    },
  ),
),

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 20240227_165632.jpg Low No
balance 20240227_165706.jpg Medium No
cover 20240227_165733.jpg High Yes
7
likes
0
points
22
downloads

Publisher

unverified uploader

Weekly Downloads

Automatically resize the cached `ResizeImage` based on the size of the `widget`.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on auto_resize_image