FLUTTER ECOSYSTEM

malibayram/cached_network_image_builder

Um widget para armazenar em cache sua imagem de rede; verifique se já foi armazenada baixando-a por meio de uma solicitação HTTP básica, para que não precise ser baixada novamente.

Capa do projeto cached_network_image_builder
Stars
4
Forks
2
Último push (UTC)
21 de jan. de 2024
Status do projeto
Ativo
M. Ali Bayram GitHub avatar
GITHUB User

M. Ali Bayram ↗

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

DersHubTurkey
LinguagensC++CMakeDartRubySwiftHTMLCKotlinObjective-C

Dependências usadas

Lista de dependências 5 itens

README original

Texto original em inglês. Visite o GitHub para a versão atual.

Expandir / recolher README

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'],
),