cache_image 1.0.2 copy "cache_image: ^1.0.2" to clipboard
cache_image: ^1.0.2 copied to clipboard

outdated

Cache your network images and firebase storage images with a download re-try loop if it fails.

Flutter Cache Image #

pub package

A flutter library to download and cache images. This package supports the download of images from a standard network path and from a firebase storage path.

This package depends only on Flutter firebase storage and path provider; there are no other external dependencies.

Images are stored ok the temporary directory of the app.

How to add #

Add to pubspec.yaml:

dependencies:
  cache_image: "^1.0.0"

Add it to a dart file:

import 'package:cache_image/cache_image.dart';

To support firebase storage download the generated google-services.json file and place it inside android/app. Next, modify the android/build.gradle file and the android/app/build.gradle file to add the Google services plugin as described by the Firebase assistant.

How to use #

CacheImage can be used with any widget that requires an image as ImageProvider. Check example app for a live sample.

Image(
    fit: BoxFit.cover,
    image: CacheImage('gs://your-project.appspot.com/image.png'),
),
Image(
    fit: BoxFit.cover,
    image: CacheImage('https://your-website.com/image.png'),
)

See the example directory for a complete sample app using Cache Image.

32
likes
0
pub points
55%
popularity

Publisher

verified publisheroxequa.com

Cache your network images and firebase storage images with a download re-try loop if it fails.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

firebase_storage, flutter, path_provider

More

Packages that depend on cache_image