multi_network_image 0.1.3 copy "multi_network_image: ^0.1.3" to clipboard
multi_network_image: ^0.1.3 copied to clipboard

A package that allows you to handle adaptive images with ease.

Multi Network Image #

Package Publisher MIT License LeanCode Style

multi_network_image is a package that allows you to handle adaptive images with ease.

Status Comments
multi_network_image - Tests (stable) Current stable Flutter version
multi_network_image - Tests (beta) Current beta Flutter version
multi_network_image - Tests (3.27.0) The oldest supported Flutter version

Getting started #

  1. Add this package to your dependencies.
dependencies:
  multi_network_image: latest_version
copied to clipboard
  1. Get the dependencies.
flutter pub get
copied to clipboard
  1. Use MultiNetworkImage as a source for your Image.
return Image(
  image: MultiNetworkImage([
    // The main image that we want to display.
    'https://picsum.photos/2000',
    // You can provide additional images that will be used
    // as a fallback if the main image is not available.
    'https://picsum.photos/200',
    // The low-quality image that, if cached, will be used
    // as a placeholder.
    'https://picsum.photos/20',
  ]),
);
copied to clipboard

Details #

MultiNetworkImage will look for the first image that is both provided in the list and is cached, and will use it as an initial source.

After that (or if no image is cached), it will try to fetch the first image from the list. If it fails, it will try the next one, and so on.

It allows you to provide a low-quality image as a fallback, and a high-quality image as a primary source.

Additional information #

  • This package requires at least Flutter 3.27.0 to work.
  • If there are any issues feel free to go to GitHub Issues and report a bug.

Maintainers #

14
likes
160
points
138
downloads

Publisher

verified publishernikodembernat.com

Weekly Downloads

2024.09.08 - 2025.03.23

A package that allows you to handle adaptive images with ease.

Homepage
Repository (GitHub)
View/report issues

Topics

#flutter #image #network-image

Documentation

API reference

License

MIT (license)

Dependencies

collection, flutter

More

Packages that depend on multi_network_image