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

Get image from the cache if exist or from network. In case of error show your placeholder, this package use Dio and Hive.

Get Image Cache Network #

This package provides a configurable widget to display an image from the network or from the cache, it also provides an error widget in case of failures.

Features #

get_image_cache_network

Usage #

 GetImageCacheNetwork(
            imageFromNetworkUrl: _imageUrl, // Image from the network
            imageFromAssetsUrl: 'assets/placeholder.png', // Image for your placeholder image
            width: MediaQuery.of(context).size.width * 0.8, // Optional width by default 64
            height: MediaQuery.of(context).size.width * 0.5, // Optional height by default 64
            errorWidth: MediaQuery.of(context).size.width * 0.8, // Optional width by error widget
            errorHeight: MediaQuery.of(context).size.width * 0.5, // Optional height by error widget
            showLogs: true, // Optional setting to show or hide log of request
            cacheDuration: 10 // Optional duration of the file in cache 15 days by default
            loading: const CircularProgressIndicator(color: Colors.blue), // Optional widget to do loading by default progress indicator with green color
          )

Additional information #

This package use dio to manage request and use hive to storage cache.

8
likes
150
points
46
downloads

Publisher

unverified uploader

Weekly Downloads

Get image from the cache if exist or from network. In case of error show your placeholder, this package use Dio and Hive.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

dartz, dio, dio_cache_interceptor, dio_cache_interceptor_hive_store, flutter, hive, path_provider

More

Packages that depend on get_image_cache_network