Search packages, repositories and app categories

GitHub repositorymalibayram/cached_network_image_builder

cached_network_image_builder

A widget to cache your network image check it if it has already stored with downloading it through basic http request, so doesn't need to download it again.

cached_network_image_builder project cover
Stars
4
Forks
2
Last push (UTC)
Jan 21, 2024
Project status
Active

Original README

English project snapshot. Visit GitHub for the latest content.

cached_network_image_builder

A widget to cache your network image with downloading it via using basic http request and check it if it has already stored, so doesn't need to download it again.

Thanks to pixabay for free images.

Important note:
  • The packages will download the image only once, which means it doesn't listen for changes on the server after downloading it.

How to use

  • Basic usage:
CachedNetworkImageBuilder(
    url: "https://cdn.pixabay.com/photo/2020/05/17/20/21/cat-5183427_1280.jpg",
    builder: (imageFile) {
        return Center(child: Image.file(imageFile));
    },
),
  • More customized usage:
CachedNetworkImageBuilder(
    url: "misformatted_url_or_url_that_doesn't_contain_image",
    builder: (image) {
        return Center(child: Image.file(image));
    },
    // Optional Placeholder widget until image loaded from url
    placeHolder: LinearProgressIndicator(),
    // Optional error widget
    errorWidget: Image.asset('assets/images/error_image.png'),
    // Optional describe your image extensions default values are; jpg, jpeg, gif and png
    imageExtensions: ['jpg', 'png'],
),
M. Ali Bayram GitHub avatar
GitHub author

M. Ali Bayram ↗

software developer #Flutter #Firebase #Angular #TensorFlow Computer Engineering PhD Candidate at Yıldız Technical University in Turkey

DersHubTurkey
LanguagesC++CMakeDartRubySwiftHTMLCKotlinObjective-C

Dependencies used

Dependency list 5 items

How do I choose a repository?

Start with your use case, compare repository activity, and check the original project before adopting it.

  1. Search by repository name, owner or description, then narrow the results by topic.
  2. Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
  3. Read the README, license and issues on GitHub before using a project.

Sources and maintenance

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗